Apply when defining service.json routes, choosing public vs segment vs private URL prefixes for VTEX IO services, or setting HTTP cache headers that interact with the VTEX edge and CDN.
Apply when defining service.json routes, choosing public vs segment vs private URL prefixes for VTEX IO services, or setting HTTP cache headers that interact with the VTEX edge and CDN.
Covers path patterns, cookie visibility, edge caching behavior, and aligning Cache-Control with data sensitivity.
Use for Node or .NET IO backends where request path and response headers determine CDN safety.
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Claude CodeNot declared
CursorNot declared
CodexNot declared
GitHub CopilotNot declared
WindsurfNot declared
Gemini CLINot declared
ClineNot declared
OpenCodeNot declared
Repository health
Stars42
LicenseLICENSE
Default branchmain
Open issues0
Status
Active
Package contents
Files included with this skill beyond the listing page.
skill mdSKILL.md7,255 B
docsSUMMARY.md3,982 B
History
First seen on skills.sh
First recorded snapshot · 835 installs
SKILL.md
VTEX IO service paths and CDN behavior
When this skill applies
Use this skill when you define or change service.json routes for a VTEX IO backend and need the edge (CDN) to pass the right cookies and apply the right caching for that endpoint’s data.
Choosing between public, segment (/v/segment/...), and private (/v/private/...) path prefixes for a route
Setting Cache-Control (and related headers) on HTTP responses so public cache behavior matches data scope (anonymous vs segment vs authenticated shopper)
Explaining why a route does not receive vtexsession or vtexsegment cookies
Troubleshooting CloudFront or edge behavior when cookies are missing (see official troubleshooting)
Do not use this skill for:
Application-level LRU caches, VBase, or stale-while-revalidate orchestration → use vtex-io-application-performance
GraphQL field-level @cacheControl only → use vtex-io-graphql-api alongside this skill
Decision rules
Paths are declared in service.json under routes. The prefix you choose (/yourPath, /v/segment/yourPath, /v/private/yourPath) controls cookie forwarding and whether VTEX may cache the service response at the edge—see the Service path patterns table.
Public ({yourPath}): No guarantee the app receives request cookies. The edge may cache responses when possible. Use for non-user-specific data (e.g. static reference data that is safe to share across shoppers).
Segment (/v/segment/{yourPath}): The app receives vtexsegment. The edge caches per segment. Use when the response depends on segment (currency, region, sales channel, etc.) but not on authenticated identity.
Private (/v/private/{yourPath}): The app receives vtexsegment and vtex_session. The edge does not cache the service response. Use for identity- or session-scoped data (orders, addresses, profile).
Cache-Control on responses must align with classification: never signal CDN/shared cache for payloads that embed secrets, per-user data, or authorization decisions unless the contract is explicitly designed for that (e.g. immutable public assets). When in doubt, prefer private paths and no-store / private cache directives for shopper-specific JSON.
Constraint: Do not use a public or segment-cached path for private or auth-scoped payloads
Routes that return authenticated shopper data, PII, or authorization-sensitive JSON must not rely on public paths or edge-cached responses that could serve one user’s data to another.
Why this matters — The edge may cache or route without the session context you expect; misclassified data can leak across users or segments.
Detection — A route under a public path returns order history, addresses, tokens, or account-specific fields; or Cache-Control suggests long-lived public caching for such payloads.
Correct — Use /v/private/... for the route (or a pattern that receives vtexsession), and set appropriateCache-Control (e.g. private, no-store for JSON APIs that are not cacheable). Note: the path prefix (/_v/private/) controls CDN and cookie behavior; the "public": true field controls whether VTEX auth tokens are required to call the route—these are orthogonal.
Wrong — Exposing GET /my-app/orders as a public path (no /v/private/ or /v/segment/ prefix) and returning per-user JSON while assuming the browser session is always visible to the service.
Preferred pattern
Classify the response (anonymous, segment, authenticated) before picking the path prefix.