Skip to content

Add "Vary: Origin" header to CORS preflight responses - #2882

Merged
tsegismont merged 1 commit into
vert-x3:masterfrom
tsegismont:issue/2880
May 19, 2026
Merged

Add "Vary: Origin" header to CORS preflight responses#2882
tsegismont merged 1 commit into
vert-x3:masterfrom
tsegismont:issue/2880

Conversation

@tsegismont

Copy link
Copy Markdown
Member

See #2880

The preflight branch (OPTIONS + Access-Control-Request-Method) was missing the "Vary: Origin header", while the non-preflight and no-origin branches already included it.

Without it, HTTP caches may serve a preflight response with the wrong Access-Control-Allow-Origin when multiple origins are allowed or credentials are enabled.

See https://fetch.spec.whatwg.org/#cors-protocol-and-http-caches

Some portions of this content were created with the assistance of Claude Code.

@tsegismont tsegismont added this to the 5.1.0 milestone May 12, 2026
@tsegismont

Copy link
Copy Markdown
Member Author

@pmlopes any chance for you to take a look?

See vert-x3#2880

The preflight branch (OPTIONS + Access-Control-Request-Method) was missing the "Vary: Origin header", while the non-preflight and no-origin branches already included it.

Without it, HTTP caches may serve a preflight response with the wrong Access-Control-Allow-Origin when multiple origins are allowed or credentials are enabled.

See https://fetch.spec.whatwg.org/#cors-protocol-and-http-caches

Some portions of this content were created with the assistance of Claude Code.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont
tsegismont merged commit c6dfbab into vert-x3:master May 19, 2026
12 of 13 checks passed
@tsegismont
tsegismont deleted the issue/2880 branch May 19, 2026 14:07
tsegismont added a commit that referenced this pull request May 19, 2026
See #2880

The preflight branch (OPTIONS + Access-Control-Request-Method) was missing the "Vary: Origin header", while the non-preflight and no-origin branches already included it.

Without it, HTTP caches may serve a preflight response with the wrong Access-Control-Allow-Origin when multiple origins are allowed or credentials are enabled.

See https://fetch.spec.whatwg.org/#cors-protocol-and-http-caches

Some portions of this content were created with the assistance of Claude Code.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont added a commit that referenced this pull request May 19, 2026
…#2894)

See #2880

The preflight branch (OPTIONS + Access-Control-Request-Method) was missing the "Vary: Origin header", while the non-preflight and no-origin branches already included it.

Without it, HTTP caches may serve a preflight response with the wrong Access-Control-Allow-Origin when multiple origins are allowed or credentials are enabled.

See https://fetch.spec.whatwg.org/#cors-protocol-and-http-caches

Some portions of this content were created with the assistance of Claude Code.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant