mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 11:07:49 +01:00
this is very cool
This commit is contained in:
parent
1c9027b2ed
commit
c94078ec2f
1 changed files with 2 additions and 4 deletions
|
@ -115,13 +115,11 @@ this is our config file,you can change stuff here
|
|||
});
|
||||
|
||||
app.use(function (request, response, next) {
|
||||
if (config.enablealwayshttps) {
|
||||
if (process.env.NODE_ENV != "development" && !request.secure) {
|
||||
if (config.enablealwayshttps && !request.secure) {
|
||||
return response.redirect(
|
||||
"https://" + request.headers.host + request.url
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
next();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue