Skip to content

Commit 665b85e

Browse files
committed
fixes
1 parent 2d47110 commit 665b85e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
const backendHost = '127.0.0.1';
22
const backendPort = <%= applicationTypeMicroservice ? gatewayServerPort : serverPort %>;
33

4+
<%_ if (clientBundlerExperimentalEsbuild) { _%>
5+
/**
6+
* @type {import('vite').CommonServerOptions['proxy']}
7+
*/
8+
<%_ } _%>
49
export default {
510
<%_ if (communicationSpringWebsocket) { _%>
611
'/websocket': {
712
target: `ws://${backendHost}:${backendPort}`,
8-
ws: true
13+
ws: true,
914
},
1015
<%_ } _%>
1116
'^/(api|management|v3/api-docs<% if (databaseTypeSql && devDatabaseTypeH2Any) { %>|h2-console<% } %><% if (authenticationTypeOauth2) { %>|oauth2|login<% } %><% if (authenticationTypeSession) { %>|login<% } %><% if (applicationTypeGateway || applicationTypeMicroservice) { %>|services<% } %>)': {
12-
router: req => ({ protocol: `http${req.socket.ssl ? 's' : ''}:`, host: backendHost, port: backendPort }),
17+
<%_ if (clientBundlerExperimentalEsbuild) { _%>
18+
target: `http://${backendHost}:${backendPort}`,
19+
<%_ } else { _%>
20+
router: req => `http${req.socket.ssl ? 's' : ''}://${backendHost}:${backendPort}`,
21+
<%_ } _%>
22+
xfwd: true,
1323
},
1424
};

0 commit comments

Comments
 (0)