Welcome! Log In Create A New Profile

Advanced

Passing small request_body to auth_request through a header

April 26, 2017 10:44AM
I have a small body (less than 512 bytes) that I'd like to pass to
auth_request. Since the body is discarded, I've tried passing it
through a header with no luck. Is there any way to do this?

location = /my_auth
{
internal;

include fastcgi_params;
fastcgi_pass unix:/tmp/nginx/sock/my_auth.sock;

proxy_pass_request_body off;
proxy_set_header Content-Length "";

proxy_set_header MYBODY $request_body;
fastcgi_param MYBODY $request_body;
}

location = /login
{
auth_request /my_auth;
client_max_body_size 512;
}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Passing small request_body to auth_request through a header

djczaski April 26, 2017 10:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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