vendredi 21 septembre 2018

nginx alternative for proxy_pass directive within if statement

I've got the following NGINX configuration:

- location /concepts {
  if ( $isapirequest = "true" ) { proxy_pass http://172.0.0.1:5050/search/; }
  }

The error that I'm getting is:

\"proxy_pass\" cannot have URI part in location given by regular expression, or inside named location, or inside \"if\" statement, or inside \"limit_except\"

Can you guys think of any way on NGINX to achieve the above without using an "if" statement?

Aucun commentaire:

Enregistrer un commentaire