NGINX testcookie robot mitigation module

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

testcookie testcookie 指令在 NGINX 中启用或禁用基于 cookie 的机器人缓解挑战。 httpserverlocation testcookie_arg `testcookie_arg` 指令定义了一个 GET 参数名称,用于在 NGINX 的 testcookie 机器人缓解模块中确定设置 Cookie… httpserverlocation testcookie_deny_keepalive 'testcookie_deny_keepalive' 指令会禁用未通过测试 cookie 验证的请求的 keep-alive 连接。 httpserverlocation testcookie_domain `testcookie_domain` 指令指定与用于 NGINX testcookie 机器人缓解模块的挑战响应 cookie 相关联的域名。 httpserverlocation testcookie_expires `testcookie_expires` 指令设置用于 NGINX testcookie 机器人缓解模块中的测试挑战 cookie 的过期日期。 httpserverlocation testcookie_fallback 设置在超过最大 cookie 设置尝试次数后用于重定向的备用 URL。 httpserverlocation testcookie_get_only 'testcookie_get_only' 指令允许在不设置挑战 cookie 的情况下检索 cookie,主要用于防止自动化机器人请求。 httpserverlocation testcookie_httponly_flag testcookie_httponly_flag 指令为 NGINX testcookie 模块设置的 cookies 配置 HttpOnly… httpserverlocation testcookie_https_location `testcookie_https_location` 指令指定在发出 test cookie 挑战时应将用户重定向到的位置,主要用于 HTTPS 场景。 httpserverlocation testcookie_internal NGINX testcookie 模块中的 `testcookie_internal` 指令启用对与 cookie 相关挑战的内部请求处理。 httpserverlocation testcookie_max_attempts testcookie_max_attempts 指令限制设置挑战 cookie 时的重定向尝试次数。 httpserverlocation testcookie_name testcookie_name 指令设置用于机器人防护的挑战 cookie 的名称。 httpserverlocation testcookie_p3p 'testcookie_p3p' 指令为 testcookie 模块设置的 cookies 指定了 P3P 隐私策略。 httpserverlocation testcookie_pass testcookie_pass 指令允许你根据变量的值在 NGINX 的 testcookie 模块中启用或禁用挑战 Cookie 检查。 httpserverlocation testcookie_path `testcookie_path` 指令指定 NGINX testcookie 机器人防护模块中质询 cookie 的路径。 httpserverlocation testcookie_port_in_redirect 'testcookie_port_in_redirect' 指令指定在设置挑战 cookie 时重定向 URI 是否应包含端口号。 httpserverlocation testcookie_redirect_via_refresh testcookie_redirect_via_refresh 指令控制网页在 cookie 挑战响应中是否使用 HTML meta refresh 重定向。 httpserverlocation testcookie_refresh_encrypt_cookie 指令 `testcookie_refresh_encrypt_cookie` 控制 NGINX testcookie 机器人缓解模块中挑战 cookie… httpserverlocation testcookie_refresh_encrypt_cookie_iv 指令 'testcookie_refresh_encrypt_cookie_iv' 配置用于使用 AES-128 加密算法对挑战 cookie… httpserverlocation testcookie_refresh_encrypt_cookie_key 'testcookie_refresh_encrypt_cookie_key' 指令在 NGINX 的 testcookie… httpserverlocation testcookie_refresh_status testcookie_refresh_status 指令控制在 NGINX 的 testcookie 机器人缓解模块中挑战 cookie 刷新过程中返回的… httpserverlocation testcookie_refresh_template 为 NGINX 中的 testcookie 挑战/响应机制设置自定义模板。 httpserverlocation testcookie_samesite `testcookie_samesite` 指令为 NGINX testcookie 机器人缓解模块使用的 cookie 指定 SameSite 属性。 httpserverlocation testcookie_secret testcookie_secret 指令设置一个静态密钥,用于为 NGINX testcookie 机器人缓解模块计算挑战 cookie。 httpserverlocation testcookie_secure_flag 启用为挑战 Cookie 设置 Secure 标志,以增强对跨站脚本(XSS)攻击的防护。 httpserverlocation testcookie_session 'testcookie_session' 指令在 NGINX testcookie 模块中配置用于生成挑战的输入,使用客户端 IP 或 IP 与… httpserverlocation testcookie_whitelist 定义免于 test cookie 验证过程的 IP 范围,适用于特定网络,例如搜索引擎爬虫。 httpserver