多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
该模块的功能:颁发cookie 配置示例: userid on; userid_name uid; userid_domain example.com; userid_path /; userid_expires 365d; userid_p3p 'policyref="/w3c/p3p.xml", CP="CUR ADM OUR NOR STA NID"'; 指令名称:userid 默认为off on: 启用版本2 v1: 启用版本1 log: 不发送cookies,但是记录进入的cookies off: 不发送cookies,也不记录到日志 指令名称:userid_domain 功能:向指定的域颁发cookie 默认为none 指令名称: userid_expires 功能:为cookie设置生存期 默认为:none 指令名称: userid_name 功能:设置cookie的名字 默认为uid 指令名称:userid_path 功能: 设置cookie的路径 默认为:/ 案例1: ![](https://box.kancloud.cn/11bfe230d07a1534df179350e10b2afd_654x177.png) ![](https://box.kancloud.cn/73fcad6aa22d36c52278080d49d111c8_1311x688.png) 变量: Embedded Variables The ngx_http_userid_module module supports the following embedded variables: $uid_got The cookie name and received client identifier. $uid_reset If the variable is set to a non-empty string that is not “0”, the client identifiers are reset. The special value “log” additionally leads to the output of messages about the reset identifiers to the error_log. $uid_set The cookie name and sent client identifier.