Skip to content

Commit

Permalink
fix(all): Minor changes in PROD.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jul 9, 2023
1 parent 76df151 commit 892025e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 892025e

Please sign in to comment.