Skip to content

Commit

Permalink
fix: Fix ip binding problem with Vite 3
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- committed Jun 23, 2022
1 parent 171ae45 commit d382762
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 @@ -384,6 +384,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 d382762

Please sign in to comment.