comparison src/http/modules/ngx_http_access_module.c @ 1806:ba9e6e57f65d

satisfy all|any
author Igor Sysoev <igor@sysoev.ru>
date Sat, 29 Dec 2007 16:38:23 +0000
parents adca43955f79
children 2300ab9b069e
comparison
equal deleted inserted replaced
1805:bb72f7518992 1806:ba9e6e57f65d
114 114
115 if ((sin->sin_addr.s_addr & rule[i].mask) == rule[i].addr) { 115 if ((sin->sin_addr.s_addr & rule[i].mask) == rule[i].addr) {
116 if (rule[i].deny) { 116 if (rule[i].deny) {
117 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 117 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
118 118
119 if (!clcf->satisfy_any) { 119 if (clcf->satisfy == NGX_HTTP_SATISFY_ALL) {
120 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 120 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
121 "access forbidden by rule"); 121 "access forbidden by rule");
122 } 122 }
123 123
124 return NGX_HTTP_FORBIDDEN; 124 return NGX_HTTP_FORBIDDEN;