【发布时间】:2021-12-24 08:30:21
【问题描述】:
我想实现如下所示的目标,但找不到可能性:
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";
}
}
}
我该如何执行这样的决定?
【问题讨论】: