HTTP auth request directives
auth_request directive
http, server, location; default off. Delegates access to a subrequest; 2xx permits, 401/403 deny, other outcomes are errors. Optional build module since 1.5.4.
Formal Syntax & Structure
nginx syntaxnginx
auth_request uri | off;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| uri | internal authorization URI | off | Select a subrequest endpoint; 2xx allows, 401/403 denies, other statuses are errors. Off cancels inherited authorization. |
Working Example
Example Snippetnginx
auth_request /_check;