отмена auth для location

Igor Sysoev is at rambler-co.ru
Mon Nov 28 19:23:22 MSK 2005


On Mon, 28 Nov 2005, Andrew Sitnikov wrote:

>  что-то не выходит у меня "каменный цветок":
>
>  server {
>    auth_basic           "closed site";
>    auth_basic_user_file /etc/nagios/htpasswd.users;
>
>    location / {
>
>    }
>
>    location /foo {
>             auth_basic  off;
>    }
>  }
>
>  при запросе на /foo все равно хочет пароля

Я правильно понимаю, что это 0.3.12 ? Вот патч:

-----------------
--- src/http/modules/ngx_http_auth_basic_module.c       Mon Nov 28 19:19:01 2005
+++ src/http/modules/ngx_http_auth_basic_module.c       Mon Nov 28 19:18:07 2005
@@ -379,6 +379,8 @@
      if (ngx_strcmp(realm->data, "off") == 0) {
          realm->len = 0;
          realm->data = (u_char *) "";
+
+        return NGX_CONF_OK;
      }

      len = sizeof("Basic realm=\"") - 1 + realm->len + 1;
-----------------

Игорь Сысоев
http://sysoev.ru





More information about the nginx-ru mailing list