We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f5704c commit 2570846Copy full SHA for 2570846
provision-contest/ansible/group_vars/domserver.yml
@@ -0,0 +1,2 @@
1
+# If set, configure the real_ip_from header in NGINX to trust a proxy
2
+# FRONT_REVERSE_PROXY: 192.168.0.1
provision-contest/ansible/roles/domserver/templates/nginx-domjudge-inner.j2
@@ -69,5 +69,10 @@ add_header X-Content-Type-Options "nosniff";
69
add_header X-XSS-Protection "1; mode=block";
70
add_header X-Robots-Tag "none" always;
71
72
+{% if FRONT_REVERSE_PROXY is defined %}
73
+set_real_ip_from {{ FRONT_REVERSE_PROXY }};
74
+real_ip_header X-Forwarded-For;
75
+{% endif %}
76
+
77
error_log /var/log/nginx/domjudge.log;
78
access_log /var/log/nginx/domjudge.log dj_access;
0 commit comments