Welcome! Log In Create A New Profile

Advanced

Re: Are headers set in the server block inherited to all location blocks

Francis Daly
February 05, 2014 10:12AM
On Wed, Feb 05, 2014 at 05:52:21PM +0400, Maxim Dounin wrote:
> On Wed, Feb 05, 2014 at 01:33:34PM +0000, Francis Daly wrote:

Hi there,

> > Can you say where you got that impression? Perhaps documentation can be
> > clarified or corrected.
>
> It looks like add_header documentation doesn't have our usual
> clause for array-like directives, and something like this should
> be helpful:

I'm not sure where the best place for it is; but I'd suggest not putting
this on every directive, but only marking the few that don't follow the
common inheritance rules.

And then have an obvious document which describes what the common
inheritance rules are.

It would probably be something like the content linked from
http://blog.martinfjordvald.com/2012/08/ but could be simplified to
"inheritance is per-directive, and is all or nothing. The following are
'nothing'; the rest are 'all'. Exceptions are noted in the per-directive
documentation (and possibly listed here too)."

In the blog above, it indicates that "Action" directives do not inherit
-- I don't know if that's a useful distinction that could be made in
the documentation; it would presumably be extra work to ensure that
every directives is categorised as "inherit all", "inherit none", or
"exception", and I can't tell whether the benefit would be worth the cost.

> +These directives are inherited from the previous level if and
> +only if there are no
> +<literal>add_header</literal>
> +directives defined on the current level.

To me, that's not special for add_header -- that's common to all
inheriting directives bar the few exceptions (root/alias, allow/deny,
and xslt_param/xslt_string_param in stock nginx).

Maybe it is easier to put it in all directive documentation, though,
if that's what people are more likely to read.

I won't be the one doing the work, so I'm not in the right place to
judge what work should be done :-)

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Are headers set in the server block inherited to all location blocks

justink101 February 05, 2014 01:49AM

Re: Are headers set in the server block inherited to all location blocks

Francis Daly February 05, 2014 08:34AM

Re: Are headers set in the server block inherited to all location blocks

Maxim Dounin February 05, 2014 08:54AM

Re: Are headers set in the server block inherited to all location blocks

Francis Daly February 05, 2014 10:12AM

Re: Are headers set in the server block inherited to all location blocks

Maxim Dounin February 05, 2014 11:44AM

Re: Are headers set in the server block inherited to all location blocks

justink101 February 05, 2014 10:55AM

Re: Are headers set in the server block inherited to all location blocks

itpp2012 February 05, 2014 01:51PM

Re: Are headers set in the server block inherited to all location blocks

Francis Daly February 05, 2014 07:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready