Passing small request_body to auth_request through a header

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Passing small request_body to auth_request through a header

djczaski
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
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx