From c305c8d3ad7580950255fb8633602048728872bd Mon Sep 17 00:00:00 2001 From: Benno Lorenz Date: Sun, 1 Jun 2025 22:44:30 +0200 Subject: [PATCH] added bot policy to anubis --- .gitea/workflows/deploy.yml | 2 +- botPolicy.yaml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 botPolicy.yaml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f3079eb..840ce70 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -39,7 +39,7 @@ jobs: - name: Deploy with rsync run: | rsync -avz --delete -e "ssh -p ${{ secrets.SERVER_PORT }}" \ - ./public ./nginx.conf ./docker-compose.prod.yml \ + ./public ./botPolicy.yaml ./nginx.conf ./docker-compose.prod.yml \ ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:${{ secrets.DEPLOY_PATH }} - name: Restart Docker container diff --git a/botPolicy.yaml b/botPolicy.yaml new file mode 100644 index 0000000..a0eb3ac --- /dev/null +++ b/botPolicy.yaml @@ -0,0 +1,17 @@ +bots: + - name: cloudflare-workers + headers_regex: + CF-Worker: .* + action: DENY + - name: well-known + path_regex: ^/.well-known/.*$ + action: ALLOW + - name: favicon + path_regex: ^/favicon.ico$ + action: ALLOW + - name: robots-txt + path_regex: ^/robots.txt$ + action: ALLOW + - name: generic-browser + user_agent_regex: Mozilla + action: CHALLENGE \ No newline at end of file