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
CacheControl.sMaxAge(t) returns s-max-age=<t>, which gets ignored by CloudFront & everyone else.
It should have been s-maxage=<t>, without the '-' in between 'max age'. See below.
Environment
CLI Version : 1.24.0
Framework Version: 1.24.0
OS : Windows 10
Language : German
Other
This is regarding aws-s3-deployment: CacheControl.sMaxAge(t), see CDK API Doc
I am not too surprised about this issue, since the Cache-Control standard is a bit weird/inconsistent, because it is max-age with a '-' on the browser side, but s-maxage without a '-' for the proxy side. s-max-age as it is being set by CacheControl.sMaxAge(t) is being ignored by CloudFront and other web servers, as it doesn't exist.
It can currently be worked around by doing CacheControl.fromString('s-maxage=<t>').
Both the aws-s3-deployment and aws-codepipeline-actions CacheControl class uses
"s-max-age" instead of the correct "s-maxage". This change fixes to the correct
header value.
fixes#6292
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Reproduction Steps
Error Log
CacheControl.sMaxAge(t) returns
s-max-age=<t>
, which gets ignored by CloudFront & everyone else.It should have been
s-maxage=<t>
, without the '-' in between 'max age'. See below.Environment
Other
This is regarding
aws-s3-deployment
:CacheControl.sMaxAge(t)
, see CDK API DocI am not too surprised about this issue, since the Cache-Control standard is a bit weird/inconsistent, because it is
max-age
with a '-' on the browser side, buts-maxage
without a '-' for the proxy side.s-max-age
as it is being set by CacheControl.sMaxAge(t) is being ignored by CloudFront and other web servers, as it doesn't exist.It can currently be worked around by doing
CacheControl.fromString('s-maxage=<t>')
.See
Cache-Control, MDN
Cache-Control, AWS CloudFront documentation
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: