NGINX Captcha Module

15 — 所有核心与模块指令——语法、默认值、上下文与真实配置示例。

captcha captcha 指令启用在 NGINX 中生成和处理 CAPTCHA 图像的功能。 location captcha_case 'captcha_case' 指令控制验证码验证是否区分大小写。 httpserverlocation captcha_charset `captcha_charset` 指令定义了在 NGINX 中用于生成验证码文本的字符集合。 httpserverlocation captcha_csrf `captcha_csrf` 指令定义用于 CAPTCHA 验证的 CSRF 变量名称。 httpserverlocation captcha_expire `captcha_expire` 指令设置验证码在过期前的持续时间(以秒为单位)。 httpserverlocation captcha_font 'captcha_font' 指令设置用于在验证码图像中渲染文本的字体文件。 httpserverlocation captcha_height 设置验证码图片的高度(以像素为单位)。 httpserverlocation captcha_length 'captcha_length' 指令指定生成的验证码文本的长度。 httpserverlocation captcha_level 'captcha_level' 指令控制为用户验证生成的验证码的复杂度。 httpserverlocation captcha_line `captcha_line` 指令用于生成包含指定行数的验证码图像。 httpserverlocation captcha_name 'captcha_name' 指令设置用于在 NGINX Captcha 模块中存储生成的验证码值的 cookie 名称。 httpserverlocation captcha_secret captcha_secret 指令设置用于生成验证码哈希的密钥。 httpserverlocation captcha_size 'captcha_size' 指令定义 NGINX Captcha Module 生成的验证码文本的字体大小。 httpserverlocation captcha_star 在 NGINX 中启用验证码图片的生成。 httpserverlocation captcha_width 设置验证码图片的宽度(以像素为单位)。 httpserverlocation