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 mapnoSet on the response. An empty value removes a header your app sent.
cacheControltextnoValue for the Cache-Control response header, e.g. no-store.
cacheStatuseslist of numbersnoCacheable statuses. Example: 200.
corsgroupnoCORS.
setCookieslist of groupsnoSet cookies.

cors

FieldTypeRequiredDefaultDescription
enabledtrue/falsenoEnabled.
originslist of textnoCannot be * when credentials are allowed. Example: https://example.com.
allowMethodslist of textnoAllowed methods. Example: GET.
allowedHeaderslist of textnoAllowed headers. Example: Content-Type.
exposeHeaderslist of textnoExposed headers. Example: X-Request-Id.
allowCredentialstrue/falsenoAllow credentials.
maxAgenumbernoPreflight cache lifetime in seconds.

setCookies

A list; each entry has these fields.

FieldTypeRequiredDefaultDescription
nametextyesName.
valuetextnoValue.
attributesgroupnoAttributes.

setCookies.attributes

FieldTypeRequiredDefaultDescription
pathtextnoPath.
domaintextnoDomain.
maxAgenumberno0 = session, -1 = delete, >0 = persistent.
securetrue/falsenoSecure.
httpOnlytrue/falsenoHttpOnly.
sameSiteone of Strict, Lax, NonenoSameSite.