nginx-http之proxy(八)
proxy_pass
// proxy_pass
location / {
proxy_pass http://localhost:8080;
}
// proxy_pass_header
location /a {
proxy_pass_header token;
proxy_pass http://localhost;
}
// proxy_pass_request_body
location /b {
proxy_method GET;
proxy_pass_request_body off;
proxy_set_header Content-Lenght '';
proxy_pass http://localhost;
}
location /c {
proxy_method GET;
proxy_pass_request_headers off;
proxy_pass_request_body off;
proxy_pass http://localhost;
}
location /d {
proxy_read_timeout 59s;
proxy_redirect http://localhost/two/;
}
location /f {
proxy_set_body "{'code': 0}";
proxy_set_header token 'good-good-study,day-day-up';
}
如果觉得文章对您有用,请点下推荐。您的支持将鼓励我继续创作!