Preserve and Forward X-Forwarded-For Header in Outgoing Requests to *arr #1798
Patrick010
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
|
Hello, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In many proxied environments (e.g. with Caddy or Nginx), Jellyseerr correctly receives the client’s public IP via the X-Forwarded-For header from a trusted reverse proxy. This works as expected. Jellyseerr logs and uses the correct client IP.
However, when Jellyseerr forwards that request downstream to Radarr or Sonarr, it performs a new outbound HTTP request without preserving or forwarding the original X-Forwarded-For header. As a result, Radarr/Sonarr only see the IP address of the Jellyseerr container or internal host.
Additionally, Jellyseerr can use Jellyfin credentials for authentication, which means login requests originate from Jellyseerr to Jellyfin. Because Jellyseerr does not forward the original client IP downstream, Jellyfin logs see Jellyseerr’s IP instead of the actual user’s public IP.
This breaks IP attribution across the chain; logs, rate limiting, and audit trails lose the original client context. This is especially relevant in setups where multiple services (e.g. Jellyseerr -> Radarr -> Jellyfin) interact and decisions or logs depend on accurate IP tracing.
Why not just add another proxy?
Yes, technically a reverse proxy could be inserted in front of Radarr and/or Sonarr to re-inject the missing headers, but doing so adds unnecessary complexity. It introduces more containers, more moving parts, and more points of failure, just to simulate a behavior that could and should be handled at the application level.
Jellyseerr already has access to the original request and headers. It is in the perfect position to pass that information downstream without relying on an external proxy to patch the gap.
This isn’t about offloading work to a proxy, it’s about maintaining context as a responsible link in a multi-service chain.
Proposal
Jellyseerr should:
Example how the header could be assembled:
Why?
Suggested config flag
To keep it optional and safe for all environments, this could be gated behind a config option like:
preserve_forwarded_ip: trueShould this for whatever reason already be possible, then disregard this request.
Beta Was this translation helpful? Give feedback.
All reactions