B
B
Belkin2018-06-05 23:54:13
Nginx
Belkin, 2018-06-05 23:54:13

How to force nginx to return the Vary: Accept-Encoding header if brotli is used as compression?

To return statics, I use the ngx_brotli.
all statics before. compressed.
gtmetrix swears that there is no header Vary: Accept-Encoding
how to add it?
apache is not installed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
key don, 2018-06-06
@Belkin

How to add a title?
https://nginx.org/ru/docs/http/ngx_http_headers_mo...

D
dhalturin, 2019-12-17
@dhalturin

If brotli_static is set to on , then the module will set gzip_vary to 1 :
https://github.com/google/ngx_brotli/blob/e7b3b3e4...
https://nginx.org/ru/docs/http/ngx_http_gzip_modul...
which will add a header to the response

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question