mirror of
https://github.com/dap-ps/discover.git
synced 2025-02-12 09:17:32 +00:00
drop https redirect, CloudFront does it for us
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
f3797a943c
commit
f21768eee7
@ -8,15 +8,6 @@ class APIRouter {
|
|||||||
|
|
||||||
/* for ElasticBeanstalk Load Balancer healthcheck */
|
/* for ElasticBeanstalk Load Balancer healthcheck */
|
||||||
app.use('/healthcheck', async (req, res) => res.send('OK'))
|
app.use('/healthcheck', async (req, res) => res.send('OK'))
|
||||||
|
|
||||||
/* redirect if not on https on prod */
|
|
||||||
app.use(async (req, res, next) => {
|
|
||||||
if (req.get('x-forwarded-proto') == 'http') {
|
|
||||||
res.redirect('https://' + req.headers.host + req.url);
|
|
||||||
} else {
|
|
||||||
next()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user