我想从我的响应标题中删除ETag.我正在使用nginx服务器.我查看了各种帖子和博客,但找不到正确的删除方法.我所能找到的有关删除ETag的内容是官方文档中给出的内容,但无法确切地说明如何使用它.任何帮助将不胜感激.
我在http块nginx.conf中的路径"/etc/nginx/nginx.conf"中将"etag off"添加到我的文件中
我使用命令"service nginx reload"重新加载了我的nginx服务器,但即使在那之后,我的应用程序也在我的响应头中返回了Etags.响应标题
nginx: [warn] conflicting server name "ndfsy.example.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.jhvdshjfy.example.com" on 0.0.0.0:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# configuration file /etc/nginx/nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off; …Run Code Online (Sandbox Code Playgroud)