🔼 Since resolved_progo_map.conf doesn't change content per host, we should put it in /docker/rootfs/etc/nginx/conf.d/include/resolved_proto_map.conf instead.

This commit is contained in:
Seyed Mansour Mirbehbahani
2024-12-29 14:49:31 +03:30
parent 993ce372b2
commit 6c5dbf54e7
2 changed files with 1 additions and 1 deletions

View File

@@ -1,7 +0,0 @@
# Resolve the effective protocol: use X-Forwarded-Proto if set
# (e.g., from proxies like Cloudflare or AWS)
# otherwise fall back to the current scheme.
map $http_x_forwarded_proto $resolved_proto {
default $scheme;
~.+ $http_x_forwarded_proto;
}

View File

@@ -4,7 +4,7 @@
{% include "_hsts_map.conf" %}
{% include "_resolved_proto_map.conf" %}
include conf.d/include/resolved_proto_map.conf;
server {
set $forward_scheme {{ forward_scheme }};