Skip to content

Commit a26c6be

Browse files
authored
Merge pull request #96 from leev/proxy-commands-readme
Add documentation for geoip2_proxy commands
2 parents 8c78051 + 1f21603 commit a26c6be

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,18 @@ This translates to:
136136
```
137137
$country_name "default=United States" source=$remote_addr country names en
138138
```
139+
140+
##### Additional Commands:
141+
These commands works the same as the original ngx_http_geoip_module documented here: http://nginx.org/en/docs/http/ngx_http_geoip_module.html#geoip_proxy.
142+
143+
However, if you provide the `source=$variable_with_ip` option on a variable, these settings will be ignored for that particular variable.
144+
145+
```
146+
geoip2_proxy < cidr >
147+
```
148+
Defines trusted addresses. When a request comes from a trusted address, an address from the "X-Forwarded-For" request header field will be used instead.
149+
150+
```
151+
geoip2_proxy_recursive < on | off >
152+
```
153+
If recursive search is disabled then instead of the original client address that matches one of the trusted addresses, the last address sent in "X-Forwarded-For" will be used. If recursive search is enabled then instead of the original client address that matches one of the trusted addresses, the last non-trusted address sent in "X-Forwarded-For" will be used.

0 commit comments

Comments
 (0)