mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-01 06:37:18 +01:00
add secure-poketube-instance
This commit is contained in:
parent
83b52706f4
commit
0c5ef551fd
1 changed files with 2 additions and 0 deletions
|
@ -114,6 +114,8 @@ this is our config file,you can change stuff here
|
|||
app.use(function (request, response, next) {
|
||||
if (config.enablealwayshttps == true) {
|
||||
if (process.env.NODE_ENV != "development" && !request.secure) {
|
||||
response.header("secure-poketube-instance", "1");
|
||||
|
||||
return response.redirect(
|
||||
"https://" + request.headers.host + request.url
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue