Welcome! Log In Create A New Profile


Multiple subrequests, each with a proxy_pass

February 02, 2011 06:40AM
For a certain endpoint (/upload), I would like to sometimes (when content-type matches) create a subrequest which calls an upstream with proxy_pass to include content before the actual response, which is also provided via proxy_pass. This isn't working right now and is only returning the content of the subrequest's upstream. Is this even possible? Here's the config that I'm using:

location "/" {
if ($content_type ~ "^multipart/form-data") {
echo_subrequest $request_method /saver2;

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://assets;

location /saver2 {
rewrite / /__testing__/saver break;
proxy_pass http://filesaver;
Subject Author Posted

Multiple subrequests, each with a proxy_pass

scompt February 02, 2011 06:40AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 146
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready