aws-apigateway: Removal of wildcard matching from Allowed origins for CORS preflight was a breaking change #28445
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
The ability to match origins using regular expressions was removed with this change:
#26623
This causes a breaking change for Core origins relying on that behaviour.
A use case is matching a prefix/wildcard origin, for example,
*.example.com
->/https:\/\/.+\.example\.com/
Expected Behavior
The ability to match wildcard origins.
e.g.,
https://*.example.com
https://github.com/aws/aws-cdk/blob/7264121edb10feca6d4c2bce359138deb62bdf79/packages/aws-cdk-lib/aws-apigateway/lib/resource.ts#L326C1-L326C76
Current Behavior
Only
*
wildcard or exact origins are allowed.This prevents prefix matching of origins.
Reproduction Steps
Produces response template:
Possible Solution
Produces response template:
Additional Information/Context
No response
CDK CLI Version
2.115.0 (build 58027ee)
Framework Version
No response
Node.js Version
v18.14.0.
OS
n/a
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: