Skip to content

Commit

Permalink
refactor: Restrict CORS to local dev environments
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 29, 2025
1 parent 5c2369e commit 0e95444
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion buildchain/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export default defineConfig(({command}) => ({
server: {
// Allow cross-origin requests -- https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6
allowedHosts: true,
cors: true,
cors: {
origin: /(.local|.site|localhost)/
},
fs: {
strict: false
},
Expand Down

0 comments on commit 0e95444

Please sign in to comment.