Skip to content

Commit

Permalink
🩹(frontend) fix allowed hosts by Vite using the Tilt stack
Browse files Browse the repository at this point in the history
When using nip.io for local development DNS mapping (which allows hostname-based
access to localhost), we need to explicitly allow these domains in Vite's server
configuration to prevent host security violations.

This check should be ignored when using https.
  • Loading branch information
lebaudantoine committed Jan 27, 2025
1 parent bf28c5c commit 126de63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default defineConfig(({ mode }) => {
server: {
port: parseInt(env.VITE_PORT) || 3000,
host: env.VITE_HOST || 'localhost',
allowedHosts: ['.nip.io'],
},
}
})

0 comments on commit 126de63

Please sign in to comment.