KamoCRM

Stop gating pages on the *** cookie in proxy middleware

Fixkamo-internal
Shipped
15 ஜூன், 2026 அன்று 7:58 PM UTC
Author
kamo
Commit
3623af5

proxy.ts (Next middleware) redirected every page request with no *** cookie to /logout. Since the session id now lives in sessionStorage — which a document request cannot carry — every navigation after login bounced. Server-side page-auth is fundamentally incompatible with sessionStorage, so move it to the client: the proxy now only routes OTK hand-offs and enforces IP/host rules, and useUserInfo sends genuinely-unauthenticated users (no token at all) to /logout. APIs still resolve the token from X-***-Token, so no page serves sensitive data unauthenticated.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing