Skip to content

Commit 74c99d2

Browse files
authored
docs(cookies): update good-to-know for cookie.delete (#76303)
## Why? We should also clarify that the exact subdomain must be specified when using wildcard domains. - Fixes #76275
1 parent 2e25195 commit 74c99d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/01-app/04-api-reference/04-functions/cookies.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ To learn more about these options, see the [MDN docs](https://developer.mozilla.
7171
- `cookies` is a [Dynamic API](/docs/app/building-your-application/rendering/server-components#dynamic-apis) whose returned values cannot be known ahead of time. Using it in a layout or page will opt a route into [dynamic rendering](/docs/app/building-your-application/rendering/server-components#dynamic-rendering).
7272
- The `.delete` method can only be called:
7373
- In a [Server Action](/docs/app/building-your-application/data-fetching/server-actions-and-mutations) or [Route Handler](/docs/app/building-your-application/routing/route-handlers).
74-
- If it belongs to the same domain from which `.set` is called. Additionally, the code must be executed on the same protocol (HTTP or HTTPS) as the cookie you want to delete.
74+
- If it belongs to the same domain from which `.set` is called. For wildcard domains, the specific subdomain must be an exact match. Additionally, the code must be executed on the same protocol (HTTP or HTTPS) as the cookie you want to delete.
7575
- HTTP does not allow setting cookies after streaming starts, so you must use `.set` in a [Server Action](/docs/app/building-your-application/data-fetching/server-actions-and-mutations) or [Route Handler](/docs/app/building-your-application/routing/route-handlers).
7676

7777
## Understanding Cookie Behavior in Server Components

0 commit comments

Comments
 (0)