Problem/Motivation
When a controller asks for a specific max-age the Cache-Control header gets overwritten by CacheableResponseSubscriber
Steps to reproduce
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.
Proposed resolution
Add a check to see if the Cache-Control header is overwritten. If so, keep it.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork adv_varnish-3586257
Show commands
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