ich ein Reverse nginx Proxy, wo ich alle Anfragen zu routen möchten, kommen mit:reroute nginx Anfrage url
http://dns.com/content/xyz <—to—> http://dns.com/content/1.0/xyz
Ich habe einen Upstream:
upstream backend_api.content.com {
server localhost:8080 max_fails=5 fail_timeout=30;
keepalive 100;
}
und -ort:
#Content Service
location ~* ^/content/?(.*) {
set $proxy_pass "http://backend_api.content.com";
rewrite ^/content/1.0(/.*)$ /content/1.0$1 break;
proxy_pass $proxy_pass
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host "api.stg.xxx.com";
proxy_set_header X-3scale-proxy-secret-token $secret_token;
proxy_set_header Original-Host $http_host;
proxy_set_header Authorization $outbound_auth_header;
proxy_set_header Original-Uri $scheme://$http_host$uri;
post_action /out_of_band_oauth_authrep_action;
}
aber es scheint wie alles mit http://dns/content/xyz fa ils und nur wenn ich http://dns/content/1.0/xyz gebe funktioniert es.