A sidebar control shown only to platform-side users. It clears the cookie in the browser and navigates to the console on the apex with the clear parameter appended, so the server clears it too on the next request.
Also called: exit sub-account · stop acting as · leave impersonation
- 1The cookie is deleted client-side with an expired max-age; it is path-scoped and not http-only, so this works.
- 2Navigation goes to the console on the apex with ?as=clear appended.
- 3Middleware honours the parameter server-side as a second belt.
- 4Development and production host shapes are handled separately so the exit works locally too.
The comment describes the failure it prevents: clearing the cookie 'so a later visit to the subdomain doesn't auto-resume impersonation.' Because the cookie is sticky by design — that is what makes navigation work while helping a customer — an operator would otherwise silently re-enter the account days later just by opening a bookmark. Doing it both client-side and via the middleware parameter is called out as belt-and-suspenders in the code.
- A sticky impersonation cookie silently resumed on a later visit.
- Operators had no obvious way back to their own console.
See it on your own jobs
Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.
or keep browsing features →