From 4696bbe21ad5421609094b12d08077250f654a31 Mon Sep 17 00:00:00 2001 From: yuqing521 <1581446178@qq.com> Date: Fri, 18 Jun 2021 14:45:32 +0800 Subject: [PATCH] fix: add robots.txt --- config/lanting-nginx.conf | 6 ++++++ public/robots.txt | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 public/robots.txt diff --git a/config/lanting-nginx.conf b/config/lanting-nginx.conf index b9d996a..9abdf4c 100644 --- a/config/lanting-nginx.conf +++ b/config/lanting-nginx.conf @@ -62,4 +62,10 @@ server { # as directory, then fall back to displaying a 404. try_files $uri $uri/ /index.html =404; } + + location /robots.txt { + allow all; + log_not_found off; + access_log off; + } } diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..7df4dcc --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Crawl-delay: 30 +User-agent: * +Disallow: \ No newline at end of file