Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong IP in logs in error scenario #53

Open
petski opened this issue Sep 29, 2017 · 0 comments
Open

Wrong IP in logs in error scenario #53

petski opened this issue Sep 29, 2017 · 0 comments

Comments

@petski
Copy link

petski commented Sep 29, 2017

Examples:

  1. If you request http on a https port, this results in an error 400 (Bad Request). The IP shown in the access_log is not modified by rpaf:
$ curl -k -v -H'X-Forwarded-For: 10.10.10.10' http://localhost:443/
127.0.0.1 - - [29/Sep/2017:10:28:31 +0200] "GET / HTTP/1.0" 400 ..
  1. If you use mod_php and request /exception.php which contains <?php throw new Exception("test");, then the IP in the access_log is modified by rpaf, the IP in the error_log is not:
$ curl -k -v -H'X-Forwarded-For: 10.10.10.10' https://localhost:443/exception.php
10.10.10.10 - - [29/Sep/2017:10:27:21 +0200] "GET /exception.php HTTP/1.1" 500
[Fri Sep 29 10:27:21.257548 2017] [-:error] [pid 21:tid -] [client 127.0.0.1:52788] PHP Fatal error:  Uncaught exception 'Exception' with message 'test' ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant