nginx的proxy_set_header

這幾個配置一直記不住,在此記下來;

這幾個的參數的作用是向後端轉發的時候添加頭信息;

proxy_set_header   Host    $host:$server_port;
proxy_set_header   X-Real-IP   $remote_addr;
proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;


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