在基本授权中是否有任何函数获取用户名/密码nginx.conf?
感谢。
答案 0 :(得分:7)
您可以使用标准变量 $ remote_user ,这意味着随基本身份验证提供的用户名。
http://nginx.org/en/docs/http/ngx_http_core_module.html#var_remote_user
答案 1 :(得分:2)
使用nginx第三方模块FRiCKLE/ngx_coolkit,您可以使用$remote_passwd
获取密码。和nginx核心有$remote_user
。