Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat: add CORS e2e test#127

Merged
VikramAditya33 merged 1 commit into
mainfrom
test/cors
May 12, 2026
Merged

Feat: add CORS e2e test#127
VikramAditya33 merged 1 commit into
mainfrom
test/cors

Conversation

@VikramAditya33

Copy link
Copy Markdown
Collaborator

CORS Test Suite Overview

Section Tests What it validates
Default CORS configuration 3 app.enableCors() with no args → ACAO *, preflight 204, permissive header echo
Specific origin validation 4 String origin exact match, non-matching origin rejected, preflight 403/204
Multiple origins 2 Array origin matching with Vary: Origin, non-array origin rejected
Credentials handling 3 Access-Control-Allow-Credentials: true, origin echoed (no wildcard), preflight credentials
Custom CORS configuration 5 Custom methods, allowed headers, max-age, exposed headers, method rejection (403)
Preflight header validation 2 Disallowed header → 403, allowed headers → 204 with echoed headers
Dynamic origin function 3 Function validator (sync), matching suffix allows, non-matching rejects, preflight works
Requests without Origin header 1 Same-origin/no-origin requests allowed through

Closes #126

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fb74f0e5-e647-4462-bc39-c602c83345df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/cors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@VikramAditya33 VikramAditya33 merged commit aa22676 into main May 12, 2026
3 checks passed
@VikramAditya33 VikramAditya33 deleted the test/cors branch May 12, 2026 18:39
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.

HTTP CORS E2E test

1 participant