-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Added Cloudfront Response Header changes per Nov 4 updates. #1970
Added Cloudfront Response Header changes per Nov 4 updates. #1970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making this change. There needs to be a couple of easy tweaks done. Also, it would be good to run make fix-black fix-isort test lint
just to verify the change before pushing it again. Thanks!
troposphere/cloudfront.py
Outdated
@@ -16,6 +16,9 @@ | |||
cloudfront_origin_request_query_string_behavior, | |||
cloudfront_restriction_type, | |||
cloudfront_viewer_protocol_policy, | |||
cloudfront_access_control_allow_methods, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be alphabetized in the list.
troposphere/cloudfront.py
Outdated
@@ -401,6 +404,130 @@ class OriginRequestPolicy(AWSObject): | |||
} | |||
|
|||
|
|||
class AccessControlAllowHeaders(AWSProperty): | |||
props = { | |||
"Items": [(str, True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The form [(str, True)]
should be ([str], True)
. In other words, the tuple is (property_type, required_bool) and the type is an array of str [str]
.
troposphere/cloudfront.py
Outdated
|
||
class AccessControlAllowMethods(AWSProperty): | ||
props = { | ||
"Items": [(cloudfront_access_control_allow_methods, True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same change needed.
troposphere/cloudfront.py
Outdated
|
||
class AccessControlAllowOrigins(AWSProperty): | ||
props = { | ||
"Items": [(str, True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same change needed.
troposphere/cloudfront.py
Outdated
|
||
class AccessControlExposeHeaders(AWSProperty): | ||
props = { | ||
"Items": [(str, True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same change needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Woohoo! |
Thanks! |
Adding Changes per https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html