Fixed
Project:
Advanced Varnish
Version:
4.0.15
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2026 at 11:39 UTC
Updated:
9 Aug 2026 at 16:08 UTC
Jump to comment: Most recent
When a controller asks for a specific max-age the Cache-Control header gets overwritten by CacheableResponseSubscriber
Create a controller that returns a CacheableJsonResponse with a low max-age (in my case this is for sitewide_alerts).
Call the endpoint of that controller and observe that the set Cache-Control header gets overwritten by a default.
Add a check to see if the Cache-Control header is overwritten. If so, keep it.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
victonator commentedComment #5
shumer commented