feat: add trusted client IP support for multiple gateways
This commit is contained in:
1 parent
9ad36c999c
commit
4e17dfc9c9
2 files changed
+35
-9
No files matched your search
@@ -1,13 +1,17 @@
|
||||
# restrict access
|
||||
if ($allow_access = 0) {
|
||||
return 403;
|
||||
}
|
||||
|
||||
# set headers
|
||||
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-Real-IP $trusted_client_ip;
|
||||
proxy_set_header X-Forwarded-For $trusted_client_ip;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# clean headers
|
||||
proxy_set_header X-Origin-Token '';
|
||||
proxy_set_header EO-Connecting-IP '';
|
||||
|
||||
# enable websockets: http://nginx.org/en/docs/http/websocket.html
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in new issue
Block a user