I would like to do something like:
location ~ ^/authorize/(\w+)$ {
proxy_pass http://my.vm/auth;
proxy_pass_request_body on;
proxy_set_header MY_CUSTOM_HEADER $1;
proxy_pass_request_headers on;
}
However, I get the following error message:
nginx: [emerg] "proxy_pass" cannot have URI part in
location given by regular expression, or inside named location,
or inside "if" statement, or inside "limit_except" block in
nginx.conf
Any help would be appreciated.
Thanks in advance