Skip to content

[BUG] Issue setting up proxy_set_header for IP Address in Audit log #172

@jonathon2nd

Description

@jonathon2nd

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

By setting APP_PROXIES="*" As stated here, I am able to see CloudFlare IP's but no nginx config changes I have made shows real IP in the log

Expected Behavior

I expect after setting proxy_set_header X-Forwarded-For $http_CF_Connecting_IP; in /config/nginx/site-confs/default.conf and /config/nginx/site-confs/default that it would work.

Steps To Reproduce

  1. Setup APP_PROXIES="*" to see CF IP instead of container IP.
  2. Restart k8s pod
  3. Edit page, and see Audit log is still logging CF IP's.
  4. Set proxy_set_header X-Forwarded-For $http_CF_Connecting_IP; in config files.
  5. Restart k8s pod.
  6. Edit page, and see Audit log is still logging CF IP's.

Environment

- OS: v1.24.8 +rke2r1
- How docker service was installed: Containerd, not docker

CPU architecture

x86-64

Docker creation

image:
  repository: ghcr.io/linuxserver/bookstack
  pullPolicy: Always
  # Overrides the image tag whose default is the chart appVersion.
  tag: "23.02.3"

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available

   INFO  Nothing to migrate.  

**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2018-03-06 │ 2023-04-13 │ /config/nginx/site-confs/default.conf                                  │
│ 2022-08-05 │ 2022-08-20 │ /config/nginx/ssl.conf                                                 │
│            │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default
[custom-init] No custom files found, skipping...
[ls.io-init] done.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions