Skip to content

Commit 3bc28eb

Browse files
committed
Ste proxyPath only for non-electron version
1 parent 462789e commit 3bc28eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

redisinsight/api/src/main.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,14 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
4343
app.use(bodyParser.urlencoded({ limit: '512mb', extended: true }));
4444
app.enableCors();
4545

46-
let prefix = serverConfig.globalPrefix;
47-
if (serverConfig.proxyPath) {
48-
prefix = `${serverConfig.proxyPath}/${prefix}`;
49-
}
50-
51-
app.setGlobalPrefix(prefix, { exclude: ['/'] });
46+
if (process.env.RI_APP_TYPE !== 'electron') {
47+
let prefix = serverConfig.globalPrefix;
48+
if (serverConfig.proxyPath) {
49+
prefix = `${serverConfig.proxyPath}/${prefix}`;
50+
}
5251

52+
app.setGlobalPrefix(prefix, { exclude: ['/'] });
5353

54-
if (process.env.RI_APP_TYPE !== 'electron') {
5554
SwaggerModule.setup(
5655
serverConfig.docPrefix,
5756
app,
@@ -65,6 +64,7 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
6564
},
6665
);
6766
} else {
67+
app.setGlobalPrefix(serverConfig.globalPrefix);
6868
app.useWebSocketAdapter(new WindowsAuthAdapter(app));
6969
}
7070

0 commit comments

Comments
 (0)