nginx模块之ngx_http_headers_module

https://blog.csdn.net/yum_root/article/details/77509309

说明:该模块是用于在响应给客户端的报文中添加首部

1.add_header name value
Syntax: add_header name value [always];
Default: —
Context: http, server, location, if in location
向响应报文添加自定义首部,并赋值

示例:
add_header X-Via $server_addr;

2.expires
Syntax: expires [modified] time;
expires epoch | max | off;
Default: 
expires off;
Context: http, server, location, if in location
用于添加Expire和Cache-Control首部或修改首部的值

猜你喜欢

转载自blog.csdn.net/michaelwubo/article/details/81202430