Skip to main content

Response headers

Add, override or remove headers on the response, and set CORS or cookies.

TyperesponseHeaders
CategoryTransform

Fields​

FieldTypeRequiredDefaultDescription
setHeaderskey/value mapno—Set on the response. An empty value removes a header your app sent.
cacheControltextno—Value for the Cache-Control response header, e.g. no-store.
cacheStatuseslist of numbersno—Cacheable statuses. Example: 200.
corsgroupno—CORS.
setCookieslist of groupsno—Set cookies.

cors​

FieldTypeRequiredDefaultDescription
enabledtrue/falseno—Enabled.
originslist of textno—Cannot be * when credentials are allowed. Example: https://example.com.
allowMethodslist of textno—Allowed methods. Example: GET.
allowedHeaderslist of textno—Allowed headers. Example: Content-Type.
exposeHeaderslist of textno—Exposed headers. Example: X-Request-Id.
allowCredentialstrue/falseno—Allow credentials.
maxAgenumberno—Preflight cache lifetime in seconds.

setCookies​

A list; each entry has these fields.

FieldTypeRequiredDefaultDescription
nametextyes—Name.
valuetextno—Value.
attributesgroupno—Attributes.

setCookies.attributes​

FieldTypeRequiredDefaultDescription
pathtextno—Path.
domaintextno—Domain.
maxAgenumberno—0 = session, -1 = delete, >0 = persistent.
securetrue/falseno—Secure.
httpOnlytrue/falseno—HttpOnly.
sameSiteone of Strict, Lax, Noneno—SameSite.