Skip to content

Commit 5b117f8

Browse files
committed
Merge branch 'develop'
2 parents 8930b44 + 4570223 commit 5b117f8

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [2.0.2] - 2024-04-25
8+
9+
- [#242](https://github.com/os2display/display-admin-client/pull/242)
10+
- Ensured real ip is logged in nginx.
11+
712
## [2.0.1] - 2024-04-10
813

914
- [#241](https://github.com/os2display/display-admin-client/pull/241)

infrastructure/itkdev/etc/confd/templates/nginx.conf.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ http {
3434
include /etc/nginx/mime.types;
3535
default_type application/octet-stream;
3636

37-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
37+
set_real_ip_from 172.16.0.0/8;
38+
real_ip_recursive on;
39+
real_ip_header X-Forwarded-For;
40+
41+
log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
3842
'$status $body_bytes_sent "$http_referer" '
3943
'"$http_user_agent" "$http_x_forwarded_for"';
4044

infrastructure/os2display/etc/confd/templates/nginx.conf.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ http {
3434
include /etc/nginx/mime.types;
3535
default_type application/octet-stream;
3636

37-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
37+
set_real_ip_from 172.16.0.0/8;
38+
real_ip_recursive on;
39+
real_ip_header X-Forwarded-For;
40+
41+
log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
3842
'$status $body_bytes_sent "$http_referer" '
3943
'"$http_user_agent" "$http_x_forwarded_for"';
4044

0 commit comments

Comments
 (0)