more_set_headers和add_header

more_set_headers會替換掉同名header, 避免出現兩個同名header的狀況nginx

more_set_headers 參考:https://github.com/openresty/headers-more-nginx-module#more_set_headersgit

syntax: more_set_headers [-t <content-type list>]... [-s <status-code list>]... <new-header>...github


default: noide


context: http, server, location, location ifspa


phase: output-header-filterrest


Replaces (if any) or adds (if not any) the specified output headers when the response status code matches the codes specified by the -s option AND the response content type macode

相關文章
相關標籤/搜索