add secure-poketube-instance

This commit is contained in:
Ashley 2023-01-20 18:08:28 +00:00
parent aace5f3dd9
commit 61d77e6a09

View file

@ -114,6 +114,8 @@ 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 == true) { if (config.enablealwayshttps == true) {
if (process.env.NODE_ENV != "development" && !request.secure) { if (process.env.NODE_ENV != "development" && !request.secure) {
response.header("secure-poketube-instance", "1");
return response.redirect( return response.redirect(
"https://" + request.headers.host + request.url "https://" + request.headers.host + request.url
); );