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.
|
||||
|
||||
const httpServer = express();
|
||||
httpServer.use(function (request, response, next) {
|
||||
if (process.env.NODE_ENV != 'development' && !request.secure) {
|
||||
httpServer.use( (request, response, next) => {
|
||||
if (request.headers.host != 'localhost' && !request.secure) {
|
||||
return response.redirect("https://" + request.headers.host + request.url);
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (process.env.CERTIFICATE_PFX) {
|
||||
const options1 = {
|
||||
passphrase: process.env.CERTIFICATE_PASSPHRASE,
|
||||
|
|
Loading…
Add table
Reference in a new issue