captcha_star

Enables the generation of a captcha image in NGINX.

Syntaxcaptcha;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The captcha_star directive is part of the NGINX Captcha Module and is utilized within the context of HTTP, server, and location blocks. When this directive is enabled, it instructs NGINX to generate a captcha image for user validation. This is particularly useful in preventing automated submissions on forms, enhancing security by ensuring that the user is indeed human. The directive works in conjunction with other related settings, allowing customization of captcha features such as image size, character set, and expiration time.

By default, the module provides several configuration options that can control the appearance and behavior of the captcha images, including image dimensions (width and height), text length, character sets used for the captcha text, and the expiration time of the captcha cookies. Each of these parameters can be set to align with application requirements, ensuring the captchas are both secure and user-friendly. Notably, the directive does not have a default value as it specifically defines a behavior when invoked, contrasting with directives that set specific parameters or switches.

Config Example

location =/captcha {
    captcha;
}

Ensure the captcha image is accessible; otherwise, users may face validation issues.

Remember to handle captcha validation correctly on form submissions to avoid unnecessary errors.

Check that the font path and CSRF variable settings are correctly configured for captcha generation.

← Back to all directives