Dear List ,<br><br>I need to do a conditional proxy_pass , but it's not happening as expected . <br><br>like <br><br>set $target <a href="http://www.example.com/sso/url.ping?TargetUrl=http://www.example.com/home" target="_blank">http://www.example.com/sso/url.ping?TargetUrl=http://www.example.com/home</a><br>
<br>And that $target , I would like to check with $request_uri in below segment .<br><br>location /sso/ {<br> proxy_set_header X-Real-IP $remote_addr;<br> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
proxy_set_header Host $http_host;<br> proxy_redirect off;<br> ----------<br> if ($target ~ $request_uri) {<br> proxy_pass <a href="http://10.20.137.21" target="_blank">http://10.20.137.21</a>;<br>
}<br> else {<br> return 403;<br> }<br> ------------<br> }<br><br>Is that possible achieve inside "location" for "proxy_pass" .<br>
<br>--trm<br>