Skip to content

Commit

Permalink
fix: Fix ip binding problem with Vite 3 (#14040) (#14070)
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
vaadin-bot committed Jun 27, 2022
1 parent f757a20 commit 4867f73
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 @@ -328,6 +328,7 @@ export const vaadinConfig: UserConfigFn = (env) => {
OFFLINE_PATH: settings.offlinePath
},
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 4867f73

Please sign in to comment.