mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 18:29:03 +01:00
this is very cool
This commit is contained in:
parent
c3b96cf5fe
commit
c6dff86894
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) {
|
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();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue