nginx模块之ngx_http_headers_module

来源:互联网 发布:js禁用button按钮 编辑:程序博客网 时间:2024/06/10 09:26

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

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首部或修改首部的值

原创粉丝点击