Skip to content

Commit

Permalink
fix: Fix ip binding problem with Vite 3 (#14040)
Browse files Browse the repository at this point in the history
Use 127.0.0.1 both for the Vite server and when connecting to it to ensure it works

Fixes #14021
  • Loading branch information
Artur- authored and vaadin-bot committed Jun 27, 2022
1 parent 18b19a1 commit 9092c49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions flow-server/src/main/resources/vite.generated.ts
Expand Up @@ -387,6 +387,7 @@ export const vaadinConfig: UserConfigFn = (env) => {
VITE_ENABLED: 'true'
},
server: {
host: '127.0.0.1',
fs: {
allow: allowedFrontendFolders
}
Expand Down
Expand Up @@ -78,7 +78,7 @@ public abstract class AbstractDevServerRunner implements DevModeHandler {

private static final String START_FAILURE = "Couldn't start dev server because";

private static final String DEV_SERVER_HOST = "http://localhost";
private static final String DEV_SERVER_HOST = "http://127.0.0.1";

private static final String FAILED_MSG = "\n------------------ Frontend compilation failed. ------------------\n\n";
private static final String SUCCEED_MSG = "\n----------------- Frontend compiled successfully. -----------------\n\n";
Expand Down

0 comments on commit 9092c49

Please sign in to comment.