-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Varnish ESI with xkey #7214
Labels
Bug
Error or unexpected behavior of already existing functionality
Comments
sanhofman
added
the
Bug
Error or unexpected behavior of already existing functionality
label
Nov 29, 2023
@sanhofman can it be that in your case the following part is missing:
Its included there: https://docs.sulu.io/en/2.6/cookbook/caching-with-varnish.html and it should do then the same as your adoptions: sulu/src/Sulu/Bundle/HttpCacheBundle/Resources/varnish/sulu.vcl Lines 63 to 66 in 9ae2daa
|
@alexander-schranz no it's included, see full vcl:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
| Sulu Version |2.5.8
| PHP Version | 8.2.5
We setup Sulu with Nginx using Varnish as reverse proxy. We use both user_context and tag based invalidation (xkey). Following the documentation our VCL looks like this:
Where ESI support is added below
fos_tags_xkey_recv
,fos_user_context_recv
andsulu_recv
.But ESI doesn't work, after some research and support we discovered that the
Surrogate-Capability
header was not available in responses.Probably because
fos_tags_xkey_recv
/fos_user_context_recv
are bypassing our the ESI support header.When we re-structure the VCL to:
The
Surrogate-Capability
header is properly available, resulting in ESI (including xkey and user context) working as expected.Is there a reason the
Surrogate-Capability
header was added undervcl_recv
instead ofvcl_backend_fetch
? I think it's best to also update this in documentation.The text was updated successfully, but these errors were encountered: