I want to achieve something like lined out below, but I couldn't find a possibility:
server {
listen 80;
server_name localhost;
location /get-product {
if(request=GET){
proxy_pass http://get-app-server:8080/products;
proxy_set_header Host "get-app-server";
}
if(request=POST){
proxy_pass http://post-app-server:8080/products;
proxy_set_header Host "post-app-server";
}
}
}
How could I implement such a decision?