Response Headers

Last updated on March 29, 2023.

A Response Header is a property used to define custom response headers for a page. To do so, pass JSON key-value pairs to the property, for example:

app/views/pages/xml-data.html.liquid

In the example above, the endpoint will return its content as XML, even though the file was saved as HTML. This allows you to have full control over returned headers. Liquid syntax is supported.

Note that there are a few restricted header names that cannot be overwritten:

  • cache-control
  • etag
  • set-cookie
  • x-request-id
  • x-xss-protection

Please visit our documentation on Pages for more information.

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.