Skip to content

Commit

Permalink
use 127.0.0.1 instead of localhost for vite proxy host
Browse files Browse the repository at this point in the history
Cypress will white-page when trying to load vite assets using localhost, but works fine with `127.0.0.1`.

Maybe this?
cypress-io/cypress#25397
  • Loading branch information
jxjj committed Dec 27, 2024
1 parent aa35df9 commit 9a2a57a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export default defineConfig(({ mode }) => {
},
},
server: {
host: new URL(env.VITE_CLIENT_BASE_URL).host,
host: "127.0.0.1", // or "0.0.0.0"?
port: 5173,
https: {
cert: "./.cert/cert.pem",
key: "./.cert/key.pem",
Expand Down

0 comments on commit 9a2a57a

Please sign in to comment.