Skip to content

fix: use trustedOrigins instead of checkOrigin in svelte.config.js#2604

Merged
sydseter merged 2 commits intoOWASP:masterfrom
Mysterio-17:fix/use-trustedOrigins-in-svelte-config
Mar 12, 2026
Merged

fix: use trustedOrigins instead of checkOrigin in svelte.config.js#2604
sydseter merged 2 commits intoOWASP:masterfrom
Mysterio-17:fix/use-trustedOrigins-in-svelte-config

Conversation

@Mysterio-17
Copy link
Contributor

Summary

Replaces the broad checkOrigin: true CSRF setting with an explicit trustedOrigins allowlist in svelte.config.js.

Changes

  • cornucopia.owasp.org/svelte.config.js: replaced checkOrigin: true with trustedOrigins: ["https://owaspcornucopia.org", "https://cornucopia.owasp.org"]

Closes #2602

Copilot AI review requested due to automatic review settings March 12, 2026 06:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the SvelteKit CSRF configuration for the Cornucopia site to use an explicit origin allowlist instead of a broad origin check, aligning with the recommendation in issue #2602.

Changes:

  • Replaced csrf.checkOrigin: true with csrf.trustedOrigins: [...] to explicitly allow requests from https://owaspcornucopia.org and https://cornucopia.owasp.org.

You can also share your feedback on Copilot code review. Take the survey.

@Mysterio-17
Copy link
Contributor Author

Hello @sydseter , have a look at this, whenever you have time.

@sydseter sydseter merged commit 94d4aa7 into OWASP:master Mar 12, 2026
9 checks passed
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.

Use trustedOrigins instead of checkOrigin in svelte.config.js

3 participants