Files
FilamentLaravel/vite.config.js
iridium34 af0cf8bed9 - Add CSP headers in guest.blade.php for enhanced security.
- Update Vite config with proper server settings, including CORS configuration for `ddev.site` domains.
- Upgrade dependencies in `package-lock.json`, including versions for Rollup and TailwindCSS packages.
2026-01-21 04:25:01 +01:00

27 lines
956 B
JavaScript

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
server: {
// Respond to all network requests
host: "0.0.0.0",
port: 5173,
strictPort: true,
// Defines the origin of the generated asset URLs during development,
// this must be set to the Vite dev server URL and selected port.
origin: `${process.env.DDEV_PRIMARY_URL_WITHOUT_PORT}:5173`,
// Configure CORS securely for the Vite dev server to allow requests
// from *.ddev.site domains, supports additional hostnames (via regex).
// If you use another `project_tld`, adjust this value accordingly.
cors: {
origin: /https?:\/\/([A-Za-z0-9\-\.]+)?(\.ddev\.site)(?::\d+)?$/,
},
}
});