Additional nginx config for real ip determination

This commit is contained in:
Jamie Curnow 2019-01-03 08:18:48 +10:00
parent 3836f7c40a
commit aa270925e9
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,3 @@
# Generated IP Ranges for safe real IP determination
include conf.d/include/ip_ranges.conf;
# Healthcheck Host which proxies to the Manager,
# thus the healthcheck ensures both services are running
server {

View File

@ -59,6 +59,15 @@ http {
default http;
}
# Real IP Determination
# Docker subnet:
set_real_ip_from 172.0.0.0/8;
# NPM generated CDN ip ranges:
include conf.d/include/ip_ranges.conf;
# always put the following 2 lines after ip subnets:
real_ip_header X-Forwarded-For;
real_ip_recursive on;
# Files generated by NPM
include /etc/nginx/conf.d/*.conf;
include /data/nginx/proxy_host/*.conf;