Skip to content

cors: return local reply when preflight origin does not match allowed origins#33051

Merged
mattklein123 merged 3 commits intoenvoyproxy:mainfrom
cpakulski:issue/14233
Mar 22, 2024
Merged

cors: return local reply when preflight origin does not match allowed origins#33051
mattklein123 merged 3 commits intoenvoyproxy:mainfrom
cpakulski:issue/14233

Conversation

@cpakulski
Copy link
Copy Markdown
Contributor

Commit Message:
cors: return local reply when preflight origin does not match allowed origins
Additional Description:
When CORS preflight's origin does not match configured allowed origins, the filter continued iteration. The preflight reached the upstream server. Some users expressed interest in generating local reply in such situation. Based on CORS specs, locally generated reply should not contain access-control-allow-origin response header. This behaviour is controlled by API and default setting is to forward the preflight to upstream.
Risk Level: Low
Testing: Added unit/integration tests.
Docs Changes: Yes
Release Notes: Yes
Platform Specific Features: No
Fixes #14233

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #33051 was opened by cpakulski.

see: more, trace.

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CORS: The preflight request is forwarded to the upstream if the origin is not allowed.

2 participants