Skip to content

tanstack: host-only Set-Cookie clears of vtex_session / vtex_segment dropped after the proxyHandler (follow-up to #642) #666

Open

Description

@aline-pereira

Problem (follow-up to #642)

On 7.78.0, a response that clears a cookie under several scopes still loses some of them when it goes through the worker pipeline. /telesales/sign-out on deco-sites/oficina-tanstack emits, for each of VtexIdclientAutCookie, vtex_session, vtex_segment, checkout.vtex.com, CheckoutOrderFormOwnership:

<name>=; Max-Age=0; Path=/                      (host-only)
<name>=; Max-Age=0; Domain=<host>; Path=/
<name>=; Max-Age=0; Domain=<parent>; Path=/     (when the host has a parent)

Served from the proxyHandler on 7.78.0 (local vite preview, host localhost), the response carried 8 clears instead of 10: the host-only clears of vtex_session and vtex_segment were missing, while the same host-only clear survived for the other three names. Both are in DEFAULT_SAFE_COOKIES / the VTEX cookie allowlist, so some session/segment handling appears to drop or replace the host-only Set-Cookie for those two names after the handler returns.

Answered before the framework (site-level fetch wrapper), all 10 are present.

Expected

A handler's Set-Cookie headers for distinct (name, Domain, Path) scopes all reach the client, including clears of session/segment cookies.

Found while validating deco-sites/oficina-tanstack#479.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions