Allowing the etag directive within if in location

Danila Vershinin ciapnz at gmail.com
Sat Nov 26 17:01:54 UTC 2022


Hi,

For our purposes, we need to be able to turn off etag under specific
conditions, e.g.:

location / {
    if ($condition) {
        etag off;
    }
}

However, this syntax is invalid because this directive doesn't include
the NGX_HTTP_LIF_CONF flag.

We added that flag. Then recompiled NGINX. So now:

* the syntax is accepted by NGINX
* at runtime it works as desired

Are there any potential problems with this approach? Performance or
otherwise?

Best regards,
Danila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20221127/64782994/attachment.htm>


More information about the nginx-devel mailing list