Skip to content

Commit 30fcb86

Browse files
add setcookie doc
1 parent 681eed6 commit 30fcb86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

website/docs/components/the-server.js.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ Context aggregates request data, and the registry's context. It consists of the
346346
| `requestHeaders` | `object` | represents the original request headers. When component is rendered client side this will be what is sent from the browser, when rendered server side, using oc-client, this will contain whatever the client has been configured to forward |
347347
| `setEmptyResponse` | `function` | Sets the response to be completely empty (included container and renderInfo). Recommended is to return it: `return context.setEmptyResponse();` |
348348
| `setHeader` | `function` | Needed to set custom headers. Signature is (name, value) |
349+
| `setCookie` | `function` | Needed to set cookies. Signature is (name, value, options?) where options supports all standard Express cookie options (httpOnly, secure, maxAge, etc.) |
349350
| `staticPath` | `string` | represents the path to static resources i.e. images, styles, javascript files. This is required to [reference static resources to the view](#add-static-resource-to-the-component) and **already includes a final slash** (this is relevant due to how S3 handles filePaths). |
350351

351352
### renderComponent API

0 commit comments

Comments
 (0)