- 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.
This commit is contained in:
@@ -8,4 +8,19 @@ export default defineConfig({
|
||||
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+)?$/,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user