Welcome! Log In Create A New Profile

Advanced

Re: Posting after x-accel-redirect

March 06, 2010 03:57AM
hi

use something like below to always have a GET request to your authentication upstream. then let the authentication upstream return an x-accell-redirect header. now if the original request was a post, it will still be a post after the call to the auth upstream. so you could do whatever you want with the authenticated request e.g. send it to another upstream

cheers, bernd

[code]

# internal used for authentication
location ^~ "/authenticate" {
proxy_pass http://yourauthbackend;
proxy_intercept_errors on;
proxy_method GET;
proxy_pass_request_body off;
proxy_set_header Content-Length '0';
rewrite /authenticate(.*) $1;
internal;
break;
}
[/code]
Subject Author Posted

Posting after x-accel-redirect

amvtek March 05, 2010 11:04AM

Re: Posting after x-accel-redirect

dobe March 06, 2010 03:57AM

Re: Posting after x-accel-redirect

amvtek March 06, 2010 06:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
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