this is very cool

This commit is contained in:
Ashley 2023-02-05 11:42:33 +00:00
parent 1c9027b2ed
commit c94078ec2f

View file

@ -115,13 +115,11 @@ this is our config file,you can change stuff here
}); });
app.use(function (request, response, next) { app.use(function (request, response, next) {
if (config.enablealwayshttps) { if (config.enablealwayshttps && !request.secure) {
if (process.env.NODE_ENV != "development" && !request.secure) {
return response.redirect( return response.redirect(
"https://" + request.headers.host + request.url "https://" + request.headers.host + request.url
); );
} }
}
next(); next();
}); });