Skip to content

Commit 0fe92ec

Browse files
committed
fix: TLS redirect is failing if cube.js listening on port other than 80
1 parent 123a929 commit 0fe92ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cubejs-server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CubejsServer {
3838
if (enableTls) {
3939
this.redirector = http.createServer((req, res) => {
4040
res.writeHead(301, {
41-
Location: `https://${req.headers.host}:${TLS_PORT}${req.url}`
41+
Location: `https://${req.headers.host.split(':')[0]}:${TLS_PORT}${req.url}`
4242
});
4343
res.end();
4444
});

0 commit comments

Comments
 (0)