fix: allow commands from within endpoints#14343
Conversation
🦋 Changeset detectedLatest commit: 4b4de69 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 |
d1be925 to
45e6ef9
Compare
Rich-Harris
left a comment
There was a problem hiding this comment.
I'm not sure this is quite right — surely we want to allow commands in POST requests etc, but not in GET/HEAD?
|
Are you suggesting that SvelteKit should not let developers use certain remote functions inside certain endpoints because of opinions? |
For what technical reason? |
|
RFC 9110 on HTTP semantics says this:
|
|
So no technical reason but spec reason. I'm fine looking into adjusting this, just wanted to clarify |
implemented endpoint method check for commands
* fix: allow commands from within endpoints fixes sveltejs#14325 * limit commands to post/put/patch/delete * fix * tweak --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
fixes #14325
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:.