From b864f8c92922e7e01cf4ac8cfe1dac5c1af60a62 Mon Sep 17 00:00:00 2001 From: Redume Date: Wed, 27 Nov 2024 18:02:58 +0300 Subject: [PATCH] feat: Added robots.txt --- docker-compose.yaml | 1 + nginx.conf | 8 ++++++++ robots.txt | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 robots.txt diff --git a/docker-compose.yaml b/docker-compose.yaml index 63f259b..03dc8dc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,6 +7,7 @@ services: volumes: - ./nginx.conf:/etc/nginx/nginx.conf - ./CertSSL:/etc/nginx/ssl + - ./robots.txt:/etc/nginx/robots.txt depends_on: - server - chart diff --git a/nginx.conf b/nginx.conf index b2ecc46..b9b9d0f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -57,6 +57,10 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + + location /robots.txt { + alias /etc/nginx/robots.txt; + } } server { @@ -107,5 +111,9 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + + location /robots.txt { + alias /etc/nginx/robots.txt; + } } } \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..04b5ea6 --- /dev/null +++ b/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Disallow: /api/* +Disallow: /static/*