mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[GH-ISSUE #551] "New Device Logged In" shows wrong IP #355
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tycho on GitHub (Aug 1, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/551
The "New Device Logged In" email gave me this:
My nginx config is setting the
X-Real-IPandX-Forwarded-Forheaders for the reverse proxy. Am I missing some other one that would make it recognize what the real client IP is? Or is bitwarden_rs just ignoring those headers for some reason?@janost commented on GitHub (Aug 1, 2019):
Are you sure you are properly setting
X-Real-IP?I was able to reproduce the issue without that header, however adding it back fixed the issue.
@tycho commented on GitHub (Aug 1, 2019):
I just figured it out. nginx seems to violate the "principle of least astonishment" for me rather frequently.
Here's basically what I had (removed the unimportant stuff to focus on the issue itself):
The problem was that apparently the
proxy_set_headers in theserver{}scope don't propagate to childlocation ... {}scopes. When I do this, it works as intended:I feel like I should just write a tool that generates my nginx configs at this point. They are uncomfortably verbose and I end up doing a lot of duplication to get things to behave.