File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
itkdev/nginx/etc/confd/templates
os2display/nginx/etc/confd/templates Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
44
55## [ Unreleased]
66
7+ - [ #204 ] ( https://github.com/os2display/display-api-service/pull/204 )
8+ - Ensured real ip is logged in nginx.
79- [ #200 ] ( https://github.com/os2display/display-api-service/pull/200 )
810 - Updated oidc internal documentation.
911- [ #205 ] ( https://github.com/os2display/display-api-service/pull/205 )
Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ http {
3737 include /etc/nginx/mime.types;
3838 default_type application/octet-stream;
3939
40- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
40+ set_real_ip_from 172.16.0.0/8;
41+ real_ip_recursive on;
42+ real_ip_header X-Forwarded-For;
43+
44+ log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
4145 '$status $body_bytes_sent "$http_referer" '
4246 '"$http_user_agent" "$http_x_forwarded_for"';
4347
Original file line number Diff line number Diff line change @@ -37,10 +37,13 @@ http {
3737 include /etc/nginx/mime.types;
3838 default_type application/octet-stream;
3939
40- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
40+ set_real_ip_from 172.16.0.0/8;
41+ real_ip_recursive on;
42+ real_ip_header X-Forwarded-For;
43+
44+ log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
4145 '$status $body_bytes_sent "$http_referer" '
4246 '"$http_user_agent" "$http_x_forwarded_for"';
43-
4447 error_log /dev/stderr;
4548 access_log /dev/stdout main;
4649
You can’t perform that action at this time.
0 commit comments