http-access-control #
Allows or denies a request based on an nginx variable, not only on the client address. Use it when access depends on a header, a cookie or a map result. The access directive checks its allow and deny rules in order; a variable counts as true when it is not empty and not zero.
Source: upstream source
Directives
access #
syntax: access allow | deny [variable]; · default: - · context: http, server, location, http when, server when, location when
The access directive defines an access control rule based on a variable. The variable is evaluated at runtime, and if it is non-empty and not zero, the rule is considered matched. The allow parameter allows access if the condition is met. The allowed request will no longer match the remaining access control rules.
access_deny_status #
syntax: access_deny_status code; · default: access_deny_status 403; · context: http, server, location, http when, server when, location when
Sets the HTTP status code to return in response when access is denied by a deny rule. The current location's setting also applies when the matching deny rule is inherited.
access_inherit #
syntax: access_inherit on | off | before | after; · default: access_inherit on; · context: http, server, location
Controls inheritance of access rules. With on, the previous configuration level is used when no local rules are defined or, with ngx_expr_module, all local when conditions are false. An unconditional rule or a matching when selects the local group, even if its variable parameter is empty or exactly fall back to the parent.