Improvement
Apr 24, 2025

The development environment session is now starting with the first page load.

The development environment session is now starting with the first page load.

What has changed?

The AI Commerce Cloud dev environment (https://localhost:3000) now forwards all /api/* requests through the internal Vite proxy to https://kauppa.com-backend. The proxy removes the Domain=- attribute from the Set-Cookie header, allowing _cookieCheck to be stored as a host-specific cookie already in the server-side rendering (SSR) response.

What are the benefits?

Before: The session was created only after the first client-side API call → the page had to be clicked or reloaded before the session data was available.

Now: The session is generated on the first page load. You can directly open, for example, the /checkout page, update and read the session data without any additional clicks. This speeds up the development cycle.

Technical summary

  • A proxy rule /api/ → https://kauppa.com was added to the Vite configuration (cookieDomainRewrite: '').

  • In SSR, /api/ is marked as bypassed so that the proxy handles the request.

  • CORS and SameSite=None; Secure settings remain unchanged.

No changes are required in partner code – update the repo, start the dev server, and sessions will work immediately. This improves the smoothness of development and significantly speeds up testing.

Future-proof eCommerce built in the EU

Our solution is developed and hosted in the EU, fully compliant with GDPR and other regulatory requirements. Gain peace of mind with secure data handling, reliable support, and a transparent European partner.

English
AI Commerce

3180370-3

Ranta-Tampella Street 17, 33180 Tampere

info@aicommerce.fi

© 2025 AI Commerce. All rights reserved.

Future-proof eCommerce built in the EU

Our solution is developed and hosted in the EU, fully compliant with GDPR and other regulatory requirements. Gain peace of mind with secure data handling, reliable support, and a transparent European partner.

English
AI Commerce

3180370-3

Ranta-Tampella Street 17, 33180 Tampere

info@aicommerce.fi

© 2025 AI Commerce. All rights reserved.

Future-proof eCommerce built in the EU

Our solution is developed and hosted in the EU, fully compliant with GDPR and other regulatory requirements. Gain peace of mind with secure data handling, reliable support, and a transparent European partner.

English
AI Commerce

3180370-3

Ranta-Tampella Street 17, 33180 Tampere

info@aicommerce.fi

© 2025 AI Commerce. All rights reserved.