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
Logging client real IP while running ttyd under a reverse proxy #1259
Comments
It's not supported yet, but why? you can already log the real ip with nginx. |
I tagged this as a question because I wasn't sure if it just wasn't supported or I just didn't know how to. So your comment answers my question. But either way, even though nginx can log ip fine, it would be nice too to be able to see the ip on ttyd logs on terminal. I am forwarding he real-ip related headers from nginx, ttyd just needs to read the values from the header and print it on terminal. |
I am running ttyd in my host machine (that is, not under docker, vm or bridged network) with the following command:
$ ./ttyd.x86_64 -i 127.0.0.1 -p 9000 -W command
It is then reverse proxied through nginx. Part of the relevant nginx config is below:
Requests are logged in the terminal as:
How do I get ttyd to log the clients' real ip instead of 127.0.0.1? I should mention that passing or not passing the
-i
option doesn't (and shouldn't) have any effect here.The text was updated successfully, but these errors were encountered: