Closed superandrew213 closed 5 years ago
You can already use objectHeaders
. It's just not documented.
@superandrew213 PRs for documentation updates would be gladly accepted! Or share what you did and I'll work it in...
Just did the PR for documentation.
serverless-finch
has added new functionality for their objectHeaders
. They also accept a global pattern for the object. I removed this from the documentation for now since fullstack-serverless
doesn't have this.
'someGlobPattern/*.html':
- name: header-name
value: header-value
They have also improved their S3 upload function. https://github.com/fernando-mc/serverless-finch/blob/master/lib/upload.js
I don't know if you want to fully mirror them (where appropriate), but the option for bucketPolicyFile
would be really useful too. I don't need this at the moment, but when I do, I can add it.
To fix https://github.com/fernando-mc/serverless-finch/issues/40, just add:
objectHeaders:
index.html:
- name: Cache-Control
value: no-store, no-cache
It might be appropriate for singlePageApp
to make this the default.
Any plans to add
objectHeaders
option like in https://github.com/fernando-mc/serverless-finch?It would fix issues like these: https://github.com/fernando-mc/serverless-finch/issues/40
I would like to disable CloudFront caching for index.html.