Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx - missing etag when gzip is used

If I setup nginx to use gzip, it removes any etag header.

The reasoning behind this is that the same resource cannot be byte-for-byte identical given that gzip has various compression levels.

But nginx also removes a weak etag, which just means that the resources are semantically equivalent. This seems like incorrect behavior by nginx.

Am I missing something? If not, is there a way to fix this?

wiki

like image 954
arahant Avatar asked Jun 29 '15 21:06

arahant


1 Answers

You should upgrade to nginx 1.7.3 or higher.

Feature: weak entity tags are now preserved on response modifications, and strong ones are changed to weak.

like image 87
Alexey Ten Avatar answered Nov 15 '22 17:11

Alexey Ten