Hacker News new | ask | show | jobs
by HajiraSifre 1947 days ago
You just have to use ngx_headers_more instead of the built-in headers module.

That add_header would get fixed (as a sibling comment states it should) is unlikely as it is intended to work that way:

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

It really is too bad that the functionality provided by ngx_headers_more isn't available out of the box, since it makes it a pain to use nginx on distributions that don't package it.

1 comments

In addition to that, the ngx_headers_more module also solves the second issue I mentioned. It can be used to remove the Server header completely.