Actions
Bug #1619
closedX-Forwarded-For multiple IPs
Description
I have 2 proxies chained, and this results in the following:
Processing UnattendedController#gPXE (for X.X.X.X at 2012-05-03 21:29:19) [GET] Host Load (0.3ms) SELECT * FROM "hosts" WHERE ("hosts"."ip" = 'X.X.X.X, Y.Y.Y.Y') LIMIT 1 unattended: unable to find ip/mac match for X.X.X.X, Y.Y.Y.Y and mac Filter chain halted as [:get_host_details] rendered_or_redirected. Completed in 8ms (View: 1, DB: 3) | 404 Not Found [http://whatever/unattended/gPXE]
I may cite the documentation for apache
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
Be careful when using these headers on the origin server, since they will contain more than one (comma-separated) value if the original request already contained one of these headers. For example, you can use %{X-Forwarded-For}i in the log format string of the origin server to log the original clients IP address, but you may get more than one address if the request passes through several proxies.
If I understand this correctly there should be something like a split(',')[0] somewhere.
Actions