Skip to content

Commit 47c71d1

Browse files
parthmodi152claude
andcommitted
Allow all hosts in Vite server and preview config
Fixes: "Blocked request. This host is not allowed" error - Add allowedHosts: 'all' to server config - Add preview config with allowedHosts: 'all' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7fffc95 commit 47c71d1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

frontend/vite.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default defineConfig({
3333
server: {
3434
host: true,
3535
port: 3000,
36+
allowedHosts: 'all',
3637
proxy: {
3738
'/api': {
3839
target: 'http://backend:8080',
@@ -42,4 +43,9 @@ export default defineConfig({
4243
},
4344
},
4445
},
46+
preview: {
47+
host: true,
48+
port: 3000,
49+
allowedHosts: 'all',
50+
},
4551
});

0 commit comments

Comments
 (0)