Parannus
24.4.2025
What changed?
AI Commerce Cloud's dev environment (https://localhost:3000) now routes all /api/* requests through an internal Vite proxy to the https://kauppa.com backend. The proxy removes the Domain= attribute from the Set-Cookie header, making the _cookieCheck a host-specific cookie already upon server-side rendering (SSR) feedback.
Benefits?
Before: The session was created only after the first client-side API call → the page needed to be clicked or reloaded before session data was available.
Now: The session is established on the first page load itself. You can directly open, for example, the /checkout page, update and read session data without additional clicks. Development cycles are accelerated.
Technical Summary
A proxy rule /api/ → https://kauppa.com (cookieDomainRewrite: '') was added to the Vite configuration.
During SSR, /api/ is marked to be bypassed so that the proxy manages the request.
CORS and SameSite=None; Secure settings remain unchanged.
No changes required to partners' code – just update the repo, start the dev server, and sessions work immediately. This significantly improves development flow and speeds up testing.