http-compression-normalize #
Rewrites the client Accept-Encoding header into a small, consistent set of values. Use it in front of a cache that varies on Accept-Encoding, so that browsers that differ only in header spelling share one cache entry. The original header stays in $compression_original_accept_encoding.
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
}
}
}