Welcome! Log In Create A New Profile

Advanced

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:

[code]
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 {
internal;
rewrite / /__testing__/saver break;
proxy_pass http://filesaver;
}
[/code]
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: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready