Forcing a Basic Dialog Box.

David david at styleflare.com
Fri Dec 30 03:14:58 UTC 2011


I am trying to use the new postgres module and cant figure out how to 
force a "Basic" dialog on the browser to do auth.

I am running v 1.0.11

The auth is working correctly ie: http://user:pass@domain.com correctly 
authenticates.

The thing I want to happen is force the Basic dialog in the browser to 
pass the credentials.

Here is my config.

Thanks.

location / {
         auth_basic "Restricted";
         root        /var/www/web/;
         auth_request      /auth;

         try_files $uri $uri/ @upstream;
     }


  location /auth {
             internal;

             postgres_escape   $user $remote_user;
             postgres_escape   $pass $remote_passwd;

             postgres_pass     database;
             postgres_query    "SELECT login FROM users WHERE 
login=$user AND pass=$pass";
             postgres_rewrite  no_rows 403;
             postgres_output   none;
         }



More information about the nginx mailing list