From 17ceb3bde8088d176feb76a751fb79593dd69abe Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Wed, 28 Feb 2024 20:24:28 +0100 Subject: [PATCH] Add reverse proxy settings to management.json template (#1639) Add grpc_set_header to the nginx example template --- infrastructure_files/management.json.tmpl | 7 +++++++ infrastructure_files/nginx.tmpl.conf | 1 + 2 files changed, 8 insertions(+) diff --git a/infrastructure_files/management.json.tmpl b/infrastructure_files/management.json.tmpl index 0b607245f..eadb90ce2 100644 --- a/infrastructure_files/management.json.tmpl +++ b/infrastructure_files/management.json.tmpl @@ -26,6 +26,13 @@ "Username": "", "Password": null }, + "ReverseProxy": { + "TrustedHTTPProxies": [], + "TrustedHTTPProxiesCount": 0, + "TrustedPeers": [ + "0.0.0.0/0" + ] + }, "Datadir": "", "DataStoreEncryptionKey": "$NETBIRD_DATASTORE_ENC_KEY", "StoreConfig": { diff --git a/infrastructure_files/nginx.tmpl.conf b/infrastructure_files/nginx.tmpl.conf index 77739a67a..23fd760aa 100644 --- a/infrastructure_files/nginx.tmpl.conf +++ b/infrastructure_files/nginx.tmpl.conf @@ -46,6 +46,7 @@ server { proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Host $host; + grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Proxy dashboard location / {