【nginx根据特定header值设置proxy_set_header】

目录

  • nginx conf

nginx conf

server {
listen 8080;
location / {
set l o g i n t y p e " c u s t o m o a u t h 2 " ; i f ( logintype "custom_oauth2"; if ( logintype"customoauth2";if(http_x_lsc_version = “1”) {
set $logintyype “lark”;
}
proxy_set_header X-Login-Type $logintype;
proxy_pass http://xxx.xxx.xxx.xxx:xxxx
}

你可能感兴趣的:(nginx,运维)