We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ad03e9 commit e90f3a4Copy full SHA for e90f3a4
nginx.conf.template
@@ -25,22 +25,13 @@ http {
25
server_name ${SERVER_NAME};
26
27
location / {
28
-
29
- # Check if CF-Connecting-IP exists and set X-Forwarded-For accordingly
30
- set $real_ip $remote_addr;
31
- if ($http_cf_connecting_ip) {
32
- # Override if Cloudflare header is present
33
- set $real_ip $http_cf_connecting_ip;
34
- }
35
36
- # Set headers for proxying
37
- proxy_set_header X-Real-IP $real_ip;
38
- proxy_set_header X-Forwarded-For $real_ip;
+ proxy_set_header X-Real-IP $client_ip;
+ proxy_set_header X-Forwarded-For $client_ip;
39
40
proxy_set_header Host $host;
41
proxy_set_header Connection $http_connection;
42
43
proxy_pass http://${BACKEND_HOST}:${BACKEND_PORT};
44
}
45
46
-}
+}
0 commit comments