http-compression-normalize #
ngx_http_compression_normalize_module is an Nginx module designed to parse, normalize, and manage the Accept-Encoding headers from client requests. It ensures consistent handling of compression algorithms by standardizing the Accept-Encoding values, facilitating better compression management and improved vary cache per
Source: upstream source
Directives
compression_normalize_accept_encoding #
syntax: compression_normalize_accept_encoding combinations1 [combinations2 ..] | off; · default: compression_normalize_accept_encoding off; · context: http, server, location
Enables the normalization of the Accept-Encoding header by specifying preferred combinations of compression algorithms. This directive accepts a list of compression methods, allowing to define the order and priority of encoding types that the server should prefer when responding to client requests. For example, with the following configuration
Example
http {
compression_normalize_accept_encoding gzip,br,zstd gzip,br zstd br gzip;
server {
listen 80;
server_name example.com;
location / {
# Your configurations
}
}
}