-
-
Couldn't load subscription status.
- Fork 2.1k
chore: deprecate csrf.checkOrigin in favour of csrf.trustedOrigins: ['*']
#14281
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
Conversation
🦋 Changeset detectedLatest commit: 333d9fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| checkOrigin: deprecate( | ||
| boolean(true), | ||
| (keypath) => | ||
| `\`${keypath}\` has been deprecated in favour of \`csrf.trustedOrigins: ['*']\`. It will be removed in a future version` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* is only correct for checkOrigin false, if someone had an explicit checkOrigin: true in their config this message would be misleading
what would be the correct value for "only allow deployed origin", empty array or not setting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty array or not setting it. since the default for checkOrigins is true, the only reason someone would really have for setting it at all is to disable it, so i think the message is okay
Co-authored-by: Tee Ming <[email protected]>
follow-up to #14021. It doesn't really make sense to have two options that can contradict each other, so this deprecates
checkOriginin favour oftrustedOrigins: ['*']Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits