Blog Post
steffenschoene
6 years agoExpert
Hi,
I played something with the addHeader function of 19.1. Is there any way to remove default header for endpoints? For example our endpoints have the following default settings for Cache-Control:
Cache-Control: no-cache Cache-Control: no-store
I added this to my controller of the endpoint:
http.response.addHeader("Cache-Control","max-age=60, private")}
This leads to the following header setting:
Cache-Control: no-cache Cache-Control: no-store Cache-Control: max-age=60, private
The new command out of 19.1 do not overwrite the default setting like expected. They only add new settings so the browser still takes the no-cache setting into account.
Like in my case it would be a great to have an opportunity to reset the default cache-control setting for endpoints. Is there any option which we can use for that?
Regards,
Steffen