Skip to content

Commit

Permalink
fix: Fix ip binding problem with Vite 3 (#14040) (#14071)
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

Co-authored-by: Artur <artur@vaadin.com>
  • Loading branch information
vaadin-bot and Artur- committed Jun 27, 2022
1 parent 1706607 commit 61abf71
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 @@ -127,6 +127,7 @@ export const vaadinConfig: UserConfigFn = (env) => {
OFFLINE_PATH: "'.'"
},
server: {
host: '127.0.0.1',
fs: {
allow: allowedFrontendFolders,
}
Expand Down
Expand Up @@ -77,7 +77,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 61abf71

Please sign in to comment.