diff --git a/frontend/src/routes/(public)/join/[token]/+page.server.ts b/frontend/src/routes/(public)/join/[token]/+page.server.ts index 5ba5970..deea5ae 100644 --- a/frontend/src/routes/(public)/join/[token]/+page.server.ts +++ b/frontend/src/routes/(public)/join/[token]/+page.server.ts @@ -1,4 +1,5 @@ import { fail, redirect } from '@sveltejs/kit'; +import { dev } from '$app/environment'; import { apiClient } from '$lib/server/api'; import type { Actions, PageServerLoad } from './$types'; @@ -74,7 +75,7 @@ export const actions = { path: '/', httpOnly: true, sameSite: 'lax', - secure: true + secure: !dev }); } diff --git a/frontend/src/routes/(public)/join/[token]/page.server.test.ts b/frontend/src/routes/(public)/join/[token]/page.server.test.ts index db0ff2f..ae9f9b8 100644 --- a/frontend/src/routes/(public)/join/[token]/page.server.test.ts +++ b/frontend/src/routes/(public)/join/[token]/page.server.test.ts @@ -4,6 +4,8 @@ vi.mock('$env/dynamic/private', () => ({ env: { BACKEND_URL: 'http://localhost:8080' } })); +vi.mock('$app/environment', () => ({ dev: false })); + const mockGet = vi.fn(); const mockPost = vi.fn(); vi.mock('$lib/server/api', () => ({