You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
S3 bucket hosting allows you to set HTTP headers for responses to incoming requests via "Metadata" for each object in the bucket. It would be great to be able to specify these through the options in serverless.yml.
A specific use case for this would be for setting Cache-Control headers, which are particularly important for making sure that browsers don't cache files on your site that may change frequently.
I'm imagining this as an optional parameter in serverless.yml that could specify metadata for any specific file or folder as well as for the every object in the bucket. File-specific metadata would override folder-specific metadata, which would in turn override ALL_OBJECTS metadata.
@linusmarco makes sense to me. I've run into this issue before a ton myself and had to deal with it manually. I'd love to be able to specify that in the config once and avoid doing it manually.
Go for it. I will admit I'm slower merging things these days because I need automated tests still and there are quite a few use-cases to test for now.
Sounds good! I'm also happy to help you in writing up tests for new (or existing) functionality. Let me know if there's any specific place you'd want me to start.
@linusmarco Tests for literally anything would be great. I'm honestly not sure where to start as I've never written tests for anything like this before.
S3 bucket hosting allows you to set HTTP headers for responses to incoming requests via "Metadata" for each object in the bucket. It would be great to be able to specify these through the options in
serverless.yml
.A specific use case for this would be for setting Cache-Control headers, which are particularly important for making sure that browsers don't cache files on your site that may change frequently.
I'm imagining this as an optional parameter in
serverless.yml
that could specify metadata for any specific file or folder as well as for the every object in the bucket. File-specific metadata would override folder-specific metadata, which would in turn override ALL_OBJECTS metadata.I'm happy to work on a PR for this
The text was updated successfully, but these errors were encountered: