Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Cache-Control Header Configurable #6

Merged
merged 2 commits into from Apr 17, 2018
Merged

Conversation

tiandavis
Copy link
Contributor

@tiandavis tiandavis commented Apr 14, 2018

Hi @fizker and @revisohq Team!

This PR exposes the S3 file Cache-Control header as a configurable environment variable called AWS_CACHE_CONTROL. So if we wanted a 90 day cache instead of the default 30 day cache, we could run:

AWS_CACHE_CONTROL=7776000 deploy-web-to-s3 src/some-file.js

Looks good?

We're using deploy-web-to-s3 on CircleCI to deploy some SDK assets to S3. It's worked perfectly so far, so just wanted to also take some time to say Thank You!

@tiandavis tiandavis changed the title Makes Cache-Control Header Configurable Make Cache-Control Header Configurable Apr 16, 2018
Copy link
Contributor

@fizker fizker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

The base idea is fine, but the default value should be set in index.js and not bin/deploy-web-to-s3.js, to avoid breaking the node API.

@tiandavis
Copy link
Contributor Author

Good call @fizker! Pushed update moving the default value: 7657101

Looks good?

@fizker
Copy link
Contributor

fizker commented Apr 17, 2018

Looks perfect! :)

@fizker fizker merged commit 4f8985e into revisohq:master Apr 17, 2018
tiandavis added a commit to thirdiron/browzine-discovery-service-adapters that referenced this pull request Apr 17, 2018
tiandavis added a commit to thirdiron/browzine-discovery-service-adapters that referenced this pull request Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants