Skip to content
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

cors: add unmatched_preflights #3171

Merged
merged 6 commits into from May 9, 2024
Merged

Conversation

zirain
Copy link
Member

@zirain zirain commented Apr 23, 2024

xref: envoyproxy/envoy#33051

Introduce forward_not_matching_preflights allow to return local reply when preflight origin does not match allowed origins.

API: #3171

@zirain zirain requested a review from a team as a code owner April 23, 2024 03:25
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 23, 2024
@zirain zirain added release-notes-none Indicates a PR that does not require release notes. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 23, 2024
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 23, 2024
@zirain zirain requested a review from hzxuzhonghu April 23, 2024 11:53
@zirain zirain changed the title cors: add forward_not_matching_preflights cors: add donot_forward_unmatched_preflights Apr 23, 2024
Copy link
Contributor

@ramaraochavali ramaraochavali left a comment

Choose a reason for hiding this comment

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

LGTM

@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 9, 2024
@zirain zirain changed the title cors: add donot_forward_unmatched_preflights cors: add unmatched_preflights May 9, 2024
enum UnmatchedPreflights {
// Preflight requests not matching the configured allowed origin
// will be forwarded to the upstream.
FORWARD = 0;
Copy link
Member

Choose a reason for hiding this comment

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

I would set 0 to UNSPECIFIED. If we do forward = 0, we can never change our mind in the future and make 'ignore' the default. Even if we don't plan to now, its best to be precise

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

@istio-testing istio-testing merged commit 188722e into istio:master May 9, 2024
5 checks passed
@zirain zirain deleted the cors-preflight branch May 9, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants