fix(all): Minor changes in PROD.
This commit is contained in:
parent
76df151507
commit
892025e5b2
1 changed files with 2 additions and 3 deletions
|
@ -281,15 +281,14 @@ export class GBServer {
|
||||||
// Setups unsecure http redirect.
|
// Setups unsecure http redirect.
|
||||||
|
|
||||||
const httpServer = express();
|
const httpServer = express();
|
||||||
httpServer.use(function (request, response, next) {
|
httpServer.use( (request, response, next) => {
|
||||||
if (process.env.NODE_ENV != 'development' && !request.secure) {
|
if (request.headers.host != 'localhost' && !request.secure) {
|
||||||
return response.redirect("https://" + request.headers.host + request.url);
|
return response.redirect("https://" + request.headers.host + request.url);
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (process.env.CERTIFICATE_PFX) {
|
if (process.env.CERTIFICATE_PFX) {
|
||||||
const options1 = {
|
const options1 = {
|
||||||
passphrase: process.env.CERTIFICATE_PASSPHRASE,
|
passphrase: process.env.CERTIFICATE_PASSPHRASE,
|
||||||
|
|
Loading…
Add table
Reference in a new issue