From d2690e4c08deddec62e3c60b937a3441d431d8bc Mon Sep 17 00:00:00 2001 From: bddjr Date: Wed, 17 Jan 2024 22:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=9D=9E=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84robots.txt=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- english/443.md | 2 -- english/http-merge-ports.md | 2 -- english/https-merge-ports.md | 2 -- english/https.md | 8 -------- generator.js | 10 +--------- ...345\217\215\345\220\221\344\273\243\347\220\206.md" | 2 -- ...345\217\215\345\220\221\344\273\243\347\220\206.md" | 8 -------- ...345\220\210\345\271\266\347\253\257\345\217\243.md" | 2 -- ...345\220\210\345\271\266\347\253\257\345\217\243.md" | 2 -- 9 files changed, 1 insertion(+), 37 deletions(-) diff --git a/english/443.md b/english/443.md index 76c8744..461e655 100644 --- a/english/443.md +++ b/english/443.md @@ -144,8 +144,6 @@ http { return 302 https://$host$request_uri; } - # There is no need to return robots.txt separately; the panel already contains the file. - # Start reverse proxy # Proxy Daemon location ~ (^/socket.io/)|(^/upload/)|(^/download/) { diff --git a/english/http-merge-ports.md b/english/http-merge-ports.md index 0dc519c..9276504 100644 --- a/english/http-merge-ports.md +++ b/english/http-merge-ports.md @@ -114,8 +114,6 @@ http { # If the link you are accessing uses a public IP address directly, enter the public IP address here. server_name domain.com *.domain.com ; - # There is no need to return robots.txt separately; the panel already contains the file. - # Start reverse proxy # Proxy Daemon location ~ (^/socket.io/)|(^/upload/)|(^/download/) { diff --git a/english/https-merge-ports.md b/english/https-merge-ports.md index c89c293..b2daa18 100644 --- a/english/https-merge-ports.md +++ b/english/https-merge-ports.md @@ -146,8 +146,6 @@ http { # HTTP redirect to HTTPS error_page 497 https://$host:$server_port$request_uri; - # There is no need to return robots.txt separately; the panel already contains the file. - # Start reverse proxy # Proxy Daemon location ~ (^/socket.io/)|(^/upload/)|(^/download/) { diff --git a/english/https.md b/english/https.md index 1a3d9e2..3f7f7ba 100644 --- a/english/https.md +++ b/english/https.md @@ -129,12 +129,6 @@ http { # If the link you are accessing uses a public IP address directly, enter the public IP address here. server_name domain.com *.domain.com ; - # Return robots.txt to prevent search engine indexing - location =/robots.txt{ - default_type text/plain; - return 200 "User-agent: *\nDisallow: /"; - } - # Start reverse proxy location / { # Fill in the port number that the Daemon end truly listens to, and do not add a slash after it! @@ -164,8 +158,6 @@ http { # HTTP redirect to HTTPS error_page 497 https://$host:$server_port$request_uri; - # There is no need to return robots.txt separately; the panel already contains the file. - # Start reverse proxy location / { # Enter the number of the port monitored by the Web panel diff --git a/generator.js b/generator.js index 713dc50..9cd2504 100644 --- a/generator.js +++ b/generator.js @@ -455,12 +455,6 @@ ${buildconf_listen('','::',ConfS.daemonproxyport())} # 如果你访问时的链接直接使用公网IP,那么此处填写公网IP。 server_name ${ConfS.domain()} ; - # 返回 robots.txt 以防止搜索引擎收录 - location =/robots.txt{ - default_type text/plain; - return 200 "User-agent: *\\nDisallow: /"; - } - # 开始反向代理 location / { # 填写Daemon端真正监听的端口号 @@ -497,9 +491,7 @@ ${ConfS.https() ?` # 前面已经写了默认ssl配置,因此这里并 # HTTP跳转到HTTPS error_page 497 https://$host:$server_port$request_uri; -`:''} # 此处无需单独返回 robots.txt ,面板已包含该文件。 - - # 开始反向代理 +`:''} # 开始反向代理 ${ConfS.mergeports() ?` # 代理Daemon端 location ~ (^/socket.io/)|(^/upload/)|(^/download/) { # 填写Daemon端真正监听的端口号,后面不能加斜杠! diff --git "a/\344\270\272\345\220\214\344\270\200\344\270\273\346\234\272\347\232\204443\347\253\257\345\217\243\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" "b/\344\270\272\345\220\214\344\270\200\344\270\273\346\234\272\347\232\204443\347\253\257\345\217\243\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" index a19d05c..d77877c 100644 --- "a/\344\270\272\345\220\214\344\270\200\344\270\273\346\234\272\347\232\204443\347\253\257\345\217\243\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" +++ "b/\344\270\272\345\220\214\344\270\200\344\270\273\346\234\272\347\232\204443\347\253\257\345\217\243\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" @@ -153,8 +153,6 @@ http { return 302 https://$host$request_uri; } - # 此处无需单独返回 robots.txt ,面板已包含该文件。 - # 开始反向代理 # 代理Daemon端 location ~ (^/socket.io/)|(^/upload/)|(^/download/) { diff --git "a/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" "b/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" index 5344115..3a100bf 100644 --- "a/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" +++ "b/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206.md" @@ -140,12 +140,6 @@ http { # 如果你访问时的链接直接使用公网IP,那么此处填写公网IP。 server_name domain.com *.domain.com ; - # 返回 robots.txt 以防止搜索引擎收录 - location =/robots.txt{ - default_type text/plain; - return 200 "User-agent: *\nDisallow: /"; - } - # 开始反向代理 location / { # 填写Daemon端真正监听的端口号 @@ -175,8 +169,6 @@ http { # HTTP跳转到HTTPS error_page 497 https://$host:$server_port$request_uri; - # 此处无需单独返回 robots.txt ,面板已包含该文件。 - # 开始反向代理 location / { # 填写Web面板端真正监听的端口号 diff --git "a/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" "b/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" index 8f73357..2755520 100644 --- "a/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" +++ "b/\351\205\215\347\275\256HTTPS\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" @@ -159,8 +159,6 @@ http { # HTTP跳转到HTTPS error_page 497 https://$host:$server_port$request_uri; - # 此处无需单独返回 robots.txt ,面板已包含该文件。 - # 开始反向代理 # 代理Daemon端 location ~ (^/socket.io/)|(^/upload/)|(^/download/) { diff --git "a/\351\205\215\347\275\256HTTP\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" "b/\351\205\215\347\275\256HTTP\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" index 5584854..06ccf54 100644 --- "a/\351\205\215\347\275\256HTTP\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" +++ "b/\351\205\215\347\275\256HTTP\345\217\215\345\220\221\344\273\243\347\220\206\344\270\224\345\220\210\345\271\266\347\253\257\345\217\243.md" @@ -123,8 +123,6 @@ http { # 如果你访问时的链接直接使用公网IP,那么此处填写公网IP。 server_name domain.com *.domain.com ; - # 此处无需单独返回 robots.txt ,面板已包含该文件。 - # 开始反向代理 # 代理Daemon端 location ~ (^/socket.io/)|(^/upload/)|(^/download/) {