💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ## header 语法 ``` header [<matcher>] [[+|-]<field> [<value>|<find>] [<replace>]] { <field> <find> <replace> [+]<field> <value> -<field> [defer] } ``` ### 实例 ``` # 设置自定义 头 header Custom-Header "My value" # 替换 http 为 https header Location http:// https:// # 批量设置头请求 header { # enable HSTS Strict-Transport-Security max-age=31536000; # disable clients from sniffing the media type X-Content-Type-Options nosniff # clickjacking protection X-Frame-Options DENY # keep referrer data off of HTTP connections Referrer-Policy no-referrer-when-downgrade } # 根据不同路由设置请求头 route { header Cache-Control max-age=3600 header /static/* Cache-Control max-age=31536000 } ```