# Place these maps once inside the existing http {} context. # Keep your current server, TLS, proxy and location configuration. map $http_user_agent $andy_anthropic_candidate { default 0; ~*(ClaudeBot|Claude-SearchBot|Claude-User|Claude-Agent) 1; } # Keep /robots.txt readable, including requests with a query string. map "$uri|$andy_anthropic_candidate" $andy_block_anthropic { default 0; ~^/robots\.txt\| 0; ~\|1$ 1; } # Add the following uncommented block inside each existing server {} to control: # if ($andy_block_anthropic) { # return 403; # } # Run nginx -t before reloading. See DATA-CONTROL.md for tests and rollback.