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';
}

posted @ 2020-09-23 09:11  pengsn  阅读(492)  评论(0编辑  收藏  举报