-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add support for different Cache-Control/Expires headers for S3 #170
Conversation
A few things.
|
|
@BanzaiMan please let me know if you have any thoughts regarding command line. |
@BanzaiMan Does |
@Joshua-Anderson I am not sure. @bulyshko Does that command line option work? And I don't think the example you provide is getting exercised in the spec. I am also not sure if this is going to work in general. What happens if more than one glob match a single file? What takes precedence? What date time format is valid here? Is it safe to pass whatever user gives? |
You mean hashes in hashes? I think both travis-build and travis-yaml currently interpret that as branch specific options. Modelling each provider's options in travis-yaml would solve this. |
Command line functionality is not implemented yet. I'm still waiting for your suggestions on how it should look like.
I can add more specs any time if you think we need to check something else. Currently, it covers every scenario I could imagine.
Please tell me more. What makes you think so?
If more than one glob matches a single file the last match will be used. Same happens for this example: cache_control:
- max-age=2592000
- max-age=300
Why should we care about date time format at all? I mean currently docs say: The date must be in the format For us it is safe to pass whatever user gives. |
My doubt about "working in general" refers to collisions that I mentioned afterwards. There should be documentation and spec for this case. I didn't look up the date format specification. I understand that now. |
Add support for different Cache-Control/Expires headers for S3
Hi
The example in the doc is only for the no-cache parameter |
ping @BanzaiMan and @bulyshko |
@nsilberman Thank you for your comments. I've tested myself (https://github.com/bulyshko/website/commit/3d920ed0132816ab7e3bf34fa4fde9a5c85e0cec) and it seems you are right - it's not working. I'm not sure if my changes were pushed to production. CC @BanzaiMan |
Don't know. So for the moment, the only way to do this is a little bit tricky : before_install:
- openssl aes-256-cbc -K $encrypted_ENCRYPTIONKEY_key -iv $encrypted_ENCRYPTKEY_iv
-in credentials.enc -out .aws/credentials -d
- mv .aws ~/
- sudo pip install awscli
after_deploy:
- aws s3api copy-object --bucket BUCKETNAME --copy-source BUCKETNAME/FILENAME
--cache-control max-age=60 --metadata-directive REPLACE --key FILENAME |
Also you can use AWS Lambda for this. |
great idea @bulyshko |
Has this been deployed? I've tried: edge: true
cache_control:
- max-age=2592000
- no-cache:
- index.html … and can see |
yep I can confirm that the whitelisting doesn't work :( |
Will take a look. |
Does this work in
|
Any news on this? Would be great to have it working. |
See #486 for further discussion. I believe the feature is incomplete. Sorry for the tardy notice here. |
Hi @BanzaiMan, thanks for pinging me. I’ve found a problem. Will try to address in the next few days. |
See #167