Files
dukang/deploy/nginx-no-crawler.conf
T
jacy 0ff61c2cd1 chore(deploy): shop/partner/admin 禁止搜索引擎抓取
nginx 直出 robots.txt 并加 X-Robots-Tag,避免内部三端被收录。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 15:50:22 +08:00

12 lines
408 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 禁止搜索引擎抓取(shop / partner / admin,含测试域)
# 合规爬虫读 robots.txtX-Robots-Tag 覆盖不先读 robots.txt 的抓取器
add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
location = /robots.txt {
default_type text/plain;
charset utf-8;
add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
return 200 "User-agent: *\nDisallow: /\n";
}