如何使用nginx.conf在基本授权中获取用户名/密码?

kin*_*chi 2 nginx basic-authentication

在基本授权中是否有任何函数获取用户名/密码nginx.conf?

谢谢.

小智 7

您可以使用标准变量$ remote_user,它表示随基本身份验证提供的用户名.

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