Closed 5t111111 closed 3 years ago
Thanks for the bug report!
I've created a quick fix for this here: https://github.com/aws/aws-cdk/pull/15327
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
CloudFront origin request policies prevent
Authorization
header, but CDK prevents you from setting headers which includeauthorization
in their values as well.That means that in some situations you are not be able to set required headers, for example
x-wp-access-authorization
header required on WordPress site. This should be an unexpected CDK issue because you can set them on management console.Reproduction Steps
cloudfront.OriginRequestPolicy
with*-authorization-*
in itsheaderBehavior
'sallowList
What did you expect to happen?
Authorization
headerauthorization
string in themWhat actually happened?
Authorization
or headers includeauthorization
Environment
Other
This problem occurs because of this regexp matching:
https://github.com/aws/aws-cdk/blob/4330fe82f6200499dae8fd614679eeac0db67f0b/packages/%40aws-cdk/aws-cloudfront/lib/origin-request-policy.ts#L187-L189
This is :bug: Bug Report