kinakomochi
kinakomochi

Reputation: 485

How can I get username/password in basic authorization using nginx.conf?

Is there any function getting username/password nginx.conf in basic authorization?

Thanks.

Upvotes: 5

Views: 12645

Answers (2)

user1435184
user1435184

Reputation: 185

You can use standard variable $remote_user wich means user name supplied with the Basic authentication.

http://nginx.org/en/docs/http/ngx_http_core_module.html#var_remote_user

Upvotes: 14

Kindy
Kindy

Reputation: 21

with nginx 3rd-party module FRiCKLE/ngx_coolkit, you can use $remote_passwd to get password. and nginx core has $remote_user .

Upvotes: 2

Related Questions