Can proxy_pass work with variables? I am trying to make the below configuration work:
http {
...
map $http_user_agent $myvariable {
default 'mobile';
}
...
}
The location configuration:
server {
listen 80;
...
location /site {
proxy_pass http://docker-site/site/$myvariable;
}
...
}
The configuration works if I replace the proxy_pass with http://docker-site/site/mobile;
Let me know if I am on the right track.