HTTP headers
Three directives are introduced by this module that will affect the header of the response sent to the client.
First, add_header name value [always] lets you add a new line in the response headers, respecting the following syntax: Name: value. The line is added only for responses of the following codes: 200, 201, 204, 301, 302, or 304. You may insert variables in the value argument. If you specify always at the end of the directive value, the header will always be added, regardless of the response code.
Additionally, the add_trailer name value [always] directive allows you to add a header to the end of the response if the response code is one of 200, 201, 204, 206, 301, 302, 303, 307, or 308. This directive can be specified multiple ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access