chore(deploy): shop/partner/admin 禁止搜索引擎抓取
nginx 直出 robots.txt 并加 X-Robots-Tag,避免内部三端被收录。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||
<title>杜康好客 · HQ 管理后台</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
||||
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||
<title>城市合伙人</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||
<title>门店管理中心</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
@@ -104,6 +104,7 @@ server {
|
||||
client_max_body_size 50m;
|
||||
|
||||
include /opt/dukang-staging/deploy/nginx-mp-verify-staging.conf;
|
||||
include /opt/dukang-staging/deploy/nginx-no-crawler.conf;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8190;
|
||||
@@ -142,6 +143,7 @@ server {
|
||||
client_max_body_size 50m;
|
||||
|
||||
include /opt/dukang-staging/deploy/nginx-mp-verify-staging.conf;
|
||||
include /opt/dukang-staging/deploy/nginx-no-crawler.conf;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8190;
|
||||
@@ -179,6 +181,8 @@ server {
|
||||
|
||||
client_max_body_size 50m;
|
||||
|
||||
include /opt/dukang-staging/deploy/nginx-no-crawler.conf;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8190;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
@@ -94,6 +94,7 @@ server {
|
||||
client_max_body_size 50m;
|
||||
|
||||
include /opt/dukang/deploy/nginx-mp-verify.conf;
|
||||
include /opt/dukang/deploy/nginx-no-crawler.conf;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8090;
|
||||
@@ -132,6 +133,7 @@ server {
|
||||
client_max_body_size 50m;
|
||||
|
||||
include /opt/dukang/deploy/nginx-mp-verify.conf;
|
||||
include /opt/dukang/deploy/nginx-no-crawler.conf;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8090;
|
||||
@@ -169,6 +171,8 @@ server {
|
||||
|
||||
client_max_body_size 50m;
|
||||
|
||||
include /opt/dukang/deploy/nginx-no-crawler.conf;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8090;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# 禁止搜索引擎抓取(shop / partner / admin,含测试域)
|
||||
# 合规爬虫读 robots.txt;X-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";
|
||||
}
|
||||
Reference in New Issue
Block a user