Bubka / 2FAuth

A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
https://docs.2fauth.app/
GNU Affero General Public License v3.0
2.32k stars 152 forks source link

PROXY_HEADER_FOR_IP not working as intended #396

Closed fgionghi closed 1 month ago

fgionghi commented 1 month ago

Version

5.3.0

Details & Steps to reproduce

I have 2fauth installed behind an nginx reverse proxy and I am setting the X-forwarded-for header to $proxy_add_x_forwarded_for. To reproduce set in the docker-compose:

environment:
  - PROXY_HEADER_FOR_IP="X-Forwarded-For"

in the log inside the interface I will literally see X-Forwarded-For

image

The problem persist also when using PROXY_HEADER_FOR_IP="X-Real-IP"

Expectation

I would like to see my client IP address

Error & Logs

No response

Execution environment

No response

Containerization

Additional information

No response