Skip to content

Conversation

@rikatz
Copy link
Member

@rikatz rikatz commented Aug 26, 2025

What type of PR is this?
/kind bug
/kind test

What this PR does / why we need it:

  • Adds support for a single "*" as a CORS origin
  • Adds validation tests for the AllowOrigins and AllowMethods fields

Which issue(s) this PR fixes:
Fixes #3648

Does this PR introduce a user-facing change?:

Adds support for a single '*' character on CORS origins

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 26, 2025
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 26, 2025
@rikatz rikatz force-pushed the fix-cors-cel branch 2 times, most recently from 163aa28 to aab7135 Compare August 26, 2025 21:37
wantErrors: []string{"Invalid value: \"xpto/https://xpto.com\""},
corsfilter: &gatewayv1.HTTPCORSFilter{
AllowOrigins: []gatewayv1.CORSOrigin{
"xpto/https://xpto.com",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snorwin this is the test for the comment you did. I have also fixed the cel regex :)

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rikatz!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rikatz, robscott, snorwin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2025
@k8s-ci-robot k8s-ci-robot merged commit 22b29c1 into kubernetes-sigs:main Aug 28, 2025
19 checks passed
tylerauerbeck pushed a commit to tylerauerbeck/gateway-api that referenced this pull request Nov 27, 2025
* CORS: support a single wildcard entry as origin

* CORS: Add test for CRD validations
RoseWrightdev pushed a commit to RoseWrightdev/gateway-api that referenced this pull request Jan 8, 2026
* CORS: support a single wildcard entry as origin

* CORS: Add test for CRD validations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/test lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CORS documentation and validation are not consistent

4 participants