File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ events {
15
15
http {
16
16
real_ip_header X-Forwarded-For;
17
17
set_real_ip_from 192.0.2.0/24;
18
+ real_ip_recursive on;
18
19
19
20
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
20
21
'$status $body_bytes_sent "$http_referer" '
39
40
default_type application/octet-stream;
40
41
41
42
include /etc/nginx/sites-enabled/*.conf;
42
- }
43
+ }
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ events {
13
13
}
14
14
15
15
http {
16
- real_ip_header X-Forwarded-For;
17
- set_real_ip_from 192.0.2.0/24;
18
-
19
16
resolver 192.0.2.2;
20
17
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
21
18
'$status $body_bytes_sent "$http_referer" '
@@ -79,7 +76,10 @@ http {
79
76
if ($http_cookie ~* "comment_author_|wordpress_(?!test_cookie)|wp-postpass_" ) {
80
77
set $do_not_cache 1;
81
78
}
82
- proxy_set_header Host $host;
79
+
80
+ proxy_set_header Host $host;
81
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
82
+
83
83
proxy_cache_key "$scheme://$host$request_uri $do_not_cache";
84
84
proxy_cache staticfilecache;
85
85
proxy_pass http://wordpress;
You can’t perform that action at this time.
0 commit comments