IBX-11181: Filtered client-supplied X-Forwarded-* headers in Varnish VCL - #108
Open
vidarl wants to merge 2 commits into
Open
IBX-11181: Filtered client-supplied X-Forwarded-* headers in Varnish VCL#108vidarl wants to merge 2 commits into
vidarl wants to merge 2 commits into
Conversation
vidarl
marked this pull request as ready for review
August 19, 2026 08:04
ibexa-workflow-automation-1
Bot
requested review from
mikadamczyk
and removed request for
a team
August 19, 2026 10:42
ibexa-workflow-automation-1
Bot
requested review from
Steveb-p,
ViniTou,
alongosz,
barw4,
bnowak,
ciastektk,
konradoboza,
tbialcz and
wiewiurdp
August 19, 2026 10:42
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.
v4.6Related PRs:
Follow-up to ibexa/core#699, which makes Ibexa DXP declare the peer a trusted proxy when a request
arrives via Fastly on Ibexa Cloud. Once trusted proxies are in play, every
X-Forwarded-*header aclient sends is believed by Symfony, so the VCL has to stop them from reaching the application.
Per the Upsun header documentation the
router is authoritative for
X-Forwarded-Proto,X-Client-IPandClient-Cdn, and discardswhatever the client sent for them. It says nothing about
X-Forwarded-Host,X-Forwarded-PrefixorRFC 7239
Forwarded, and states that it otherwise passes request headers through - so those threearrive client controlled and are now stripped.
X-Forwarded-Forneeded more care. Without a CDN the router only appends the real client IP towhatever the client sent, so every leading entry is client controlled.
X-Client-IPis authoritativein both the CDN and the non-CDN case, so it becomes the sole value of
X-Forwarded-For. If it isabsent the request did not come through the router at all, and the header is dropped.
No
trusted_proxiesACL here, unlike the VCLs in ibexa/http-cache:client.ipis not reliable onUpsun, where
REMOTE_ADDRis spoofed to the end user IP.For QA:
Check that https URL generation still works behind a TLS terminator once its IP is added to the
trusted_proxiesACL, and that cache invalidation and theX-Cachedebug headers are unaffected.Easiest done using a custom controller that outputs those headers if they exists, maybe
Checklist:
mainfor features, the oldest supported for bugs).$ composer fix-cs).@ibexa/engineering).