1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

feat(settings): WEBVIRTCLOUD_HTTPS enables secure cookies, HTTPS redirect and HSTS

This commit is contained in:
catborise 2026-10-07 15:39:52 +03:00
parent 7405217466
commit c1381318f1
4 changed files with 105 additions and 2 deletions

View file

@ -1,3 +1,11 @@
# "https" from a TLS-terminating proxy in front of this nginx is kept; otherwise
# the scheme of this server is used. A client claiming https over plain HTTP
# only changes how its own request is handled (no redirect, secure cookies).
map $http_x_forwarded_proto $wvc_forwarded_proto {
default $scheme;
https https;
}
server {
listen 80;
@ -14,7 +22,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Proto $wvc_forwarded_proto;
proxy_connect_timeout 1800;
proxy_read_timeout 1800;
proxy_send_timeout 1800;