Cloudflare Docs
Rules
Rules
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Add an HTTP response header with a static value

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

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.