Skip to content

Add a response header with a static value

Create a response header modification rule (part of Transform Rules) to add a `set-cookie` HTTP header to the response with a static value (`cookiename=value`).

The following HTTP response header modification rule adds a header named set-cookie with a static value (cookiename=value) to the response:

Example

Text in Expression Editor:

starts_with(http.request.uri.path, "/en/")

Selected operation under Modify response header: Add

Header name: set-cookie

Value: cookiename=value

This rule would keep any existing set-cookie headers already present in the response.