Skip to content

breaking: add paths.origin, remove prerender.origin - #16161

Merged
Rich-Harris merged 6 commits into
version-3from
elliott/paths-origin
Jul 2, 2026
Merged

Rich-Harris merged 6 commits into
version-3from
elliott/paths-origin

Conversation

@elliott-with-the-longest-name-on-github

Copy link
Copy Markdown
Contributor

Closes #14791

Removes prerender.origin in favor of paths.origin, which also applies to remote function and regular form CSRF checks. This also deprecates the ORIGIN environment variable for adapter-node.

@changeset-bot

ghost commented Jun 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5bf3da2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sveltejs/kit Major
@sveltejs/adapter-node Major

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

@elliott-with-the-longest-name-on-github
elliott-with-the-longest-name-on-github marked this pull request as ready for review June 24, 2026 22:10
@svelte-docs-bot

ghost commented Jun 24, 2026

Copy link
Copy Markdown

@elliott-with-the-longest-name-on-github

ghost commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Not sure it's possible to have the docs build pass until we switch docs over to paths.origin...

@teemingc teemingc linked an issue Jun 25, 2026 that may be closed by this pull request
Comment thread packages/adapter-node/src/handler.js Resolved
Comment thread packages/kit/src/core/config/options.js Resolved
Comment thread packages/kit/src/core/config/options.js Resolved
Elliott Johnson added 2 commits June 29, 2026 19:06
Resolved conflicts in:
- packages/adapter-cloudflare/utils.spec.js: kept upstream's restructured test
  layout (new _redirects test, _routes.json describe block) and added
  origin: 'http://localhost' to paths config to satisfy RecursiveRequired
- packages/kit/src/core/config/index.spec.js: updated test regexes to use
  config. instead of config.kit. (upstream added remove_kit_prefix helper)

▲ Created with [Vercel devbox](https://vercel.com/svelte/~/sandboxes/devboxes/qg7oetw8lrj1an64nxppzp9spsoh)
Comment thread packages/adapter-node/index.js Resolved
Comment thread packages/kit/src/runtime/server/csrf.js Resolved
Elliott Johnson and others added 2 commits June 30, 2026 11:26
@pkg-svelte-dev

ghost commented Jul 1, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 5bf3da2:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/5bf3da2b8ac58bfa8187ffabe7a3bf80b95475cf

Open in pkg.svelte.dev: https://pkg.svelte.dev/@sveltejs/kit/c/5bf3da2b8ac58bfa8187ffabe7a3bf80b95475cf

* `application/json`), so the check is solely on the request method and origin:
* a non-`GET` request is forbidden when its `Origin` header doesn't match the
* app's self-origin. Unlike `is_csrf_forbidden`, entries in `trusted_origins`
* are *not* honoured — remote function endpoints are an implementation detail,

ghost Jul 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

appreciate you using the correct spelling of 'honoured'

ghost Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

personally I hate it but I do have to kiss up to you every once and a while just to keep the manager-developer relationship going

ghost Jul 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

will be noted at perf review time

@Rich-Harris
Rich-Harris merged commit 3b907d4 into version-3 Jul 2, 2026
@Rich-Harris
Rich-Harris deleted the elliott/paths-origin branch July 2, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add config.kit.paths.origin option

4 participants