Improvement
Apr 24, 2025

Development session now starts on first page load — faster iterations without extra clicks

Development session now starts on first page load — faster iterations without extra clicks

What has changed?

In the AI Commerce Cloud development environment (https://localhost:3000), all /api/ requests are now proxied internally through Vite to https://kauppa.com.

The proxy strips the Domain= attribute from the Set-Cookie header, allowing the _cookieCheck to be saved as a host-specific cookie already in the server-side rendering (SSR) response.

Benefits

Before

Now

The session was created only after the first client-side API call → required an extra click or reload to make session data available.

The session is created already on the first page load. You can directly open, for example, the /checkout page, update, and read session data without additional interactions. The development cycle is significantly faster.

Technical summary

  • Added a Vite proxy rule: /api/ → https://kauppa.com (with cookieDomainRewrite: '').

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

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

  • No changes needed in partner code — simply update the repo, start the dev server, and sessions will work immediately.

This improvement greatly enhances development smoothness and speeds up testing.

GDPR

COMPLIANT

Future-proof eCommerce built in the EU

AI Commerce Cloud is developed and hosted within the EU, fully compliant with GDPR and all relevant regulations.

English
AI Commerce Cloud

Petrosoft Oy

FI3180370-3

Ranta-Tampellan Katu 17 33180 Tampere, Finland

info@aicommerce.fi

© 2025 AI Commerce Cloud. All rights reserved.

GDPR

COMPLIANT

Future-proof eCommerce built in the EU

AI Commerce Cloud is developed and hosted within the EU, fully compliant with GDPR and all relevant regulations.

English
AI Commerce Cloud

Petrosoft Oy

FI3180370-3

Ranta-Tampellan Katu 17 33180 Tampere, Finland

info@aicommerce.fi

© 2025 AI Commerce Cloud. All rights reserved.

GDPR

COMPLIANT

Future-proof eCommerce built in the EU

AI Commerce Cloud is developed and hosted within the EU, fully compliant with GDPR and all relevant regulations.

English
AI Commerce Cloud

Petrosoft Oy

FI3180370-3

Ranta-Tampellan Katu 17 33180 Tampere, Finland

info@aicommerce.fi

© 2025 AI Commerce Cloud. All rights reserved.