nginx-auth-request-module icon indicating copy to clipboard operation
nginx-auth-request-module copied to clipboard

Nginx Auth_Request module - How do i execute a set of nginx code if i get 200 from auth_request

Open svrsreeraj opened this issue 13 years ago • 0 comments

I want to authenticate a url using auth_request nginx module, its happening perfectly. After that i want nginx to send the response instead of executing the exact page.

location /checkAuthentication.php { auth_request /auth-here; default_type text/html; return 200 "true"; }

location /auth-here { proxy_pass http://localhost:8324/authentication.php; proxy_pass_request_body off; proxy_set_header Content-Length ""; proxy_set_header X-Original-URI $request_uri; } Here its authenticating successfully and it returns 200 from authentication.php. But instead of sending 200 "true" response its trying o fetch the checkAuthentication.php.

I want to return "true" message if it succeeds the authentication, instead of invoking checkAuthentication.php

svrsreeraj avatar Jan 07 '13 15:01 svrsreeraj