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