Hi,
I followed instructions to add a custom Cache-Control header for every HTTP response. Here is my amplify.yml:
version: 1
frontend:
phases:
build:
commands: []
artifacts:
baseDirectory: /assets
files:
- '**/*'
cache:
paths: []
customHeaders:
- pattern: '**/*'
headers:
- key: 'Cache-Control'
value: 'max-age=86400'
- pattern: '**/*'
headers:
- key: 'custom-header'
value: 'my-value'
After redeploying I do a HTTP request and successfully get custom-header in the response. But Cache-Control has this value: public, max-age=0, s-maxage=2.
Am I missing something?
Thanks for your help.
Hi. We were able to recreate this issue and have identified a fix. Will update when we have an ETA.
Hi, do you have an ETA?
I have migrated custom headers following the new documentation

Without success.
I get cache-control: max-age=0 and also a miss from CloudFront.
Hi, we are actively working on rolling out a fix for Cache-Control custom headers unable to be set which should be in all regions within the next few weeks.
@kahdojay Is there any workaround for setting cache control header?
Is there any default cache behaviour we can enforce in the meanwhile?
We are seeing max-age=0 in all requests which means Amplify is pretty much useless, because caching and instant cache-invalidation is the main usecase for many of us.