Skip to content

Commit c23133f

Browse files
author
Rafael Grigorian
committed
Fixed GH-19
1 parent a9e8db0 commit c23133f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

conf/default.vcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ sub vcl_recv {
136136
#unset req.http.X-Forwarded-Proto;
137137
#unset req.http.Cookie;
138138
}
139-
139+
set req.http.X-Forwarded-For = req.http.CF-Connecting-IP;
140140
return (hash);
141141
}
142142

conf/docker.vcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ sub vcl_recv {
122122
#unset req.http.X-Forwarded-Proto;
123123
#unset req.http.Cookie;
124124
}
125-
125+
set req.http.X-Forwarded-For = req.http.CF-Connecting-IP;
126126
return (hash);
127127
}
128128

docs/plugin_additions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ Insert plugin purge logic
3737
}
3838
```
3939

40+
True IP
41+
42+
```
43+
set req.http.X-Forwarded-For = req.http.CF-Connecting-IP;
44+
```
45+
4046
## vcl_backend_response
4147

4248
Add plugin "no-cache" logic

0 commit comments

Comments
 (0)