http-compression-vary #

ngx_http_compression_vary_filter_module is a header filter module used instead of the 'gzip_vary' directive.

Source: upstream source

Directives

compression_vary #

syntax: compression_vary on | off;  ·  default: compression_vary off;  ·  context: http, server, location

Enables or disables inserting the Vary: Accept-Encoding response header field if the directives gzip, gzip_static, or gunzip are active. This module is also effective when the directives from third-party compression modules such as brotli, brotli_static, unbrotli, zstd, zstd_static, and unzstd are activated.

Example

server {
    listen 127.0.0.1:8080;
    server_name localhost;

    location / {
        gzip on;
        compression_vary on;

        proxy_pass http://foo.com;
    }
}

↑ back to index