add_header

Syntax: add_header name value [always];
Default:
Context: http, server, location, if in location

Adds the specified field to a response header provided that the response code equals 200, 201, 204, 206, 301, 302, 303, 304, or 307. A value can contain variables.

There could be several add_header directives. These directives are inherited from the previous level if and only if there are no add_header directives defined on the current level.

If the always parameter is specified (1.7.5), the header field will be added regardless of the response code.

doc_nginx
2017-02-09 07:05:28
Comments
Leave a Comment

Please login to continue.