Skip to content

audit: Support for x-forwared-for headers to get correct user ips #4430

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

Closed
ntimo opened this issue Oct 8, 2022 · 0 comments · Fixed by #4684
Closed

audit: Support for x-forwared-for headers to get correct user ips #4430

ntimo opened this issue Oct 8, 2022 · 0 comments · Fixed by #4684
Assignees

Comments

@ntimo
Copy link
Contributor

ntimo commented Oct 8, 2022

Current situation

When coder is run behind a LB or reverse proxy for example NGINX then coder won't pickup the user ip correctly.

Desired solution

It should be possible to set the IP header and the trusted proxy range, just like in v1.

Additional notes

V1 used these env variables in order to configure this:

      - PROXY_TRUSTED_ORIGINS
      - PROXY_TRUSTED_HEADERS

Docs from v1: https://coder.com/docs/coder/latest/setup/coder-for-docker/local#ensure-that-user-ips-show-up-in-the-audit-logs

@bpmct bpmct changed the title Support for x-forwared-for headers to get correct user ips audit: Support for x-forwared-for headers to get correct user ips Oct 10, 2022
kylecarbs added a commit that referenced this issue Oct 21, 2022
@kylecarbs kylecarbs self-assigned this Oct 21, 2022
kylecarbs added a commit that referenced this issue Oct 21, 2022
kylecarbs added a commit that referenced this issue Oct 21, 2022
kylecarbs added a commit that referenced this issue Oct 21, 2022
kylecarbs added a commit that referenced this issue Oct 21, 2022
kylecarbs added a commit that referenced this issue Oct 21, 2022
kylecarbs added a commit that referenced this issue Oct 21, 2022
kylecarbs added a commit that referenced this issue Oct 23, 2022
* feat: Support x-forwarded-for headers for IPs

Fixes #4430.

* Fix realip accepting headers

* Fix unused headers
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

Successfully merging a pull request may close this issue.

2 participants