Skip to content

fix: default cookies to secure: false during development - #16462

Merged
elliott-with-the-longest-name-on-github merged 8 commits into
version-3from
elliott/no-secure-cookie-when-dev
Jul 21, 2026
Merged

elliott-with-the-longest-name-on-github merged 8 commits into
version-3from
elliott/no-secure-cookie-when-dev

Conversation

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

Copy link
Copy Markdown
Contributor

Closes #10438

@pkg-svelte-dev

ghost commented Jul 21, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 494c5cb:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/494c5cb9d19f909bb4388a836a25285781c54b1e

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16462

@changeset-bot

ghost commented Jul 21, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 494c5cb

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Minor

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

@svelte-docs-bot

ghost commented Jul 21, 2026

Copy link
Copy Markdown

Comment thread packages/kit/src/exports/public.d.ts Resolved
Comment thread packages/kit/src/exports/public.d.ts Resolved
Comment thread packages/kit/src/exports/public.d.ts Resolved
@elliott-with-the-longest-name-on-github

ghost commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

/autofix

Elliott Johnson added 3 commits July 21, 2026 15:21
@@ -37,30 +37,38 @@ const cookies_setup = ({ href, headers } = {}) => {

describe.skipIf(process.env.NODE_ENV === 'production')('cookies in dev', () => {
beforeAll(() => {
// @ts-expect-error
globalThis.__SVELTEKIT_DEV__ = true;
vi.stubGlobal('__SVELTEKIT_DEV__', true);

ghost Jul 21, 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.

Hmm this doesn't seem to work as opposed to the previous hack. Not sure why. Do we need to import cookie.js after this?

ghost Jul 21, 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.

Yeah I'm trying to figure that out, it's weird that it's not working... let me try another trick

ghost Jul 21, 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.

What's really weird is that it works on Windows but not Linux or MacOS 😓

ghost left a comment

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.

LGTM. Should be able to merge whenever the test gets fixed

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.

Disable cookie secure option when using vite dev --host

2 participants