Skip to content

Commit

Permalink
fix: TLS redirect is failing if cube.js listening on port other than 80
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Oct 16, 2019
1 parent 123a929 commit 0fe92ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cubejs-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CubejsServer {
if (enableTls) {
this.redirector = http.createServer((req, res) => {
res.writeHead(301, {
Location: `https://${req.headers.host}:${TLS_PORT}${req.url}`
Location: `https://${req.headers.host.split(':')[0]}:${TLS_PORT}${req.url}`
});
res.end();
});
Expand Down

0 comments on commit 0fe92ec

Please sign in to comment.