feat(deploy): add edge proxy HTTPS and AmneziaWG tunnel templates
This commit is contained in:
1 parent
bdc5855001
commit
b8c3c83ed8
21 files changed
+954
-3
No files matched your search
@@ -1,3 +1,13 @@
|
||||
# Behind the TLS edge proxy the client's scheme arrives in X-Forwarded-Proto
|
||||
# (deploy/edge). Keep it when it is https so the backend sees the original
|
||||
# scheme; every other value falls back to the scheme of this server. The
|
||||
# header is trustworthy only because the frontend port is published on
|
||||
# loopback or on the tunnel address, never on a public one.
|
||||
map $http_x_forwarded_proto $forwarded_proto {
|
||||
default $scheme;
|
||||
https https;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
@@ -25,7 +35,7 @@ server {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $forwarded_proto;
|
||||
proxy_set_header X-Request-ID $request_id;
|
||||
proxy_connect_timeout 3s;
|
||||
proxy_send_timeout 30s;
|
||||
@@ -41,7 +51,7 @@ server {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $forwarded_proto;
|
||||
proxy_connect_timeout 2s;
|
||||
proxy_send_timeout 5s;
|
||||
proxy_read_timeout 5s;
|
||||
|
||||
Reference in new issue
Block a user