captcha_case

The 'captcha_case' directive controls whether the captcha validation should be case-sensitive or not.

Syntaxcaptcha_case on | off;
Defaultoff
Contexthttp, server, location
Arguments1

Description

The 'captcha_case' directive allows users to specify whether captcha input should be treated as case-sensitive or case-insensitive during validation. When set to 'on', the user input is compared directly with the generated captcha text without converting either to a common case. When set to 'off', user input is converted to lowercase before the comparison is made. This is useful for enabling users to enter the captcha text without worrying about the capitalization, thereby providing a more user-friendly experience.

This directive can be applied in various contexts such as http, server, and location blocks in the NGINX configuration. This flexibility allows for adjusting the case-sensitivity of captchas based on specific location configurations or for the entire server. By default, this directive is turned 'off', meaning that the captcha validation is case-sensitive unless explicitly specified otherwise. By controlling case sensitivity, administrators can tailor the captcha experience according to their security requirements and user convenience.

Config Example

http {
    captcha_case off;
    location /captcha {
        captcha;
    }
}

Ensure the directive is set appropriately based on your application's requirements for security and user accessibility.

Setting 'captcha_case off' may reduce the security of your captcha verification if users are likely to input similar characters incorrectly.

← Back to all directives