nginx - missing etag when gzip is used

独自空忆成欢 提交于 2019-12-30 06:12:12

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/31125888/nginx-missing-etag-when-gzip-is-used

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!