docs: override X-Forwarded-Host in poster-cache nginx configuration#553
Merged
Merged
Conversation
Contributor
PR Guard
Maintainers may still close PRs that do not match project direction or review capacity. |
cedya77
pushed a commit
that referenced
this pull request
Jun 24, 2026
Mirror PR #553 into the built-in cache config so cache-miss reproxies to an Authelia/Authentik-protected addon domain match the destination host's rules instead of the poster-cache hostname. No-op for direct image upstreams.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
This PR fixes the optional
poster-cacheconfiguration documented in theREADME.mdwhich got blocked by authentication proxies (like Authelia or Authentik) on cache misses.When a request to
poster-cacheresulted in a cache MISS, Nginx forwarded the client'sX-Forwarded-Host: poster-cache.yourdomain.comto the mainaiometadataservice. Becauseposter-cacheis not (and should not be) in the whitelist of stremio-addon hostnames, Authelia blocked the request and returned a302redirect to the login page, causing the poster to fail to load in native streaming apps (like Stremio or Fusion).By explicitly overriding
X-Forwarded-Hostto$proxy_host, Authelia correctly evaluates the whitelist of the destination domain (aiometadata) instead, allowing the request to bypass auth successfully.linked issue
None
type of change
why this approach
Overriding the
X-Forwarded-Hostheader in the Nginx proxy is the standard and most secure way to handle reverse proxy requests to a downstream service when running behind a forward authentication proxy. It aligns the forwarded host header with the target host header, ensuring correct rule matching in Authelia/Authentik without exposing administrative endpoints on theposter-cachedomain (such as/statsor/purge) to public bypass rules.testing
200 OKand load the WebP/JPEG images directly instead of getting blocked with302redirects to the login portal.documentation
README.mdso that future setups include the fix out of the box.author checklist
ai usage disclosure