invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
418 stars 268 forks source link

nginx: config should include the usual "trust" the proxy in front things for IPs etc #621

Open samip5 opened 1 month ago

samip5 commented 1 month ago

Setup information

GitOps via Helm

Describe the bug The app itself doesn't seem to see the right IP address

To reproduce Steps to reproduce the behavior:

  1. Deploy app
  2. Go to the Web UI
  3. See logs of app and notice that it's not showing the right client ip, despite nginx logging it.

Expected behavior I would have expected that the X-Real-IP or X-Forwarded-For would replace the remote-addr or whatever laravel uses for the IP.

Screenshots/logs

10.244.2.170 - - [17/Oct/2024:15:37:08 +0000] "GET /api/v1/task_statuses?sort=id%7Cdesc&per_page=10&page=1&filter=&status=active HTTP/1.1" 200  1383 "https://invoice.<snip>.com/settings/task_settings" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" "10.10.11.109"
10.244.1.80 -  17/Oct/2024:15:37:05 +0000 "GET /index.php" 200

Docker/Kubernetes/Helm: