more_set_headers和add_header

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

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

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


default: no


context: http, server, location, location if


phase: output-header-filter


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 ma



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章