Nginx proxy_pass : Is it possible to add a static parameter to the URL? -
i'd add parameter in url in proxy pass. example, want add apikey : &apikey=tiger
http://mywebsite.com/oneapi?field=22 ---> https://api.somewhere.com/?field=22&apikey=tiger know solution ?
thank's lot, gilles.
server { listen 80; server_name mywebsite.com; location /oneapi{ proxy_pass https://api.somewhere.com/; } }
location = /oneapi { set $args $args&apikey=tiger; proxy_pass https://api.somewhere.com; }
Comments
Post a Comment