testcookie_name

The testcookie_name directive sets the name of the challenge cookie used for robot mitigation.

Syntaxtestcookie_name cookie_name;
DefaultTCK
Contexthttp, server, location
Arguments1

Description

The testcookie_name directive specifies the name of the cookie that is utilized as part of the robot mitigation process in the NGINX testcookie module. By default, this cookie is named TCK. This directive is important because it allows the server to identify the specific cookie that the challenge-response mechanism relies on in identifying legitimate users and distinguishing them from bots. The configuration of testcookie_name can be particularly useful in environments where multiple testcookie instances or different mitigation strategies may be deployed.

Config Example

server {
    location / {
        testcookie on;
        testcookie_name my_test_cookie;
    }
}

Ensure the cookie name does not clash with existing cookies in the application, as this could lead to erroneous behavior.

Remember to use consistent cookie names across different locations or servers to avoid unexpected interactions in the mitigation process.

← Back to all directives