Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

Trivial anti-crawler with Caddy

Дата публикации: 23-06-2026 11:45:00

With the internet being crawled to death to feed the AI God, it's becoming
seriously annoying to exposed web content on the internet. While
anubis works, it's yet another layer of
complexity. It might be worth deploying and tuning it for high-profile
websites, but for my cgit instance, it's absolutely
overkill.
Instead, I'm taking advantage of Caddy (whose
documentation doesn't have a search feature‽)
matching capabilities to gate access on either the ability to execute
javascript to set a cookie, or having a user-agent string starting with git/
so that repository are still cloneable.
git.dustri.org {
import tls
import noindex
import compress
@unverified {
not header Cookie *not_a_crawler=1*
not header User-Agent git/*
}
handle @unverified {
header Content-Type text/html
respond <<EOF
<script>
document.cookie = 'not_a_crawler=1';
window.location.reload();
</script>
EOF 418
}
reverse_proxy cgit_upstream
}
It's not perfect, trivial to bypass, but strikes the right balance between
simplicity/zero-maintenance and blocking crawlers.
This technique is now used on https://autopkgtest.ubuntu.com.

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Carrot disclosure: Forgejo09.3528-04-2026
2The AI-authored Denial-of-Service attack08.907-07-2026
3Caddy, PHP and Docker08.2430-01-2022
4swic: a simple web interface for calibre011.3221-04-2026
5Bloquer le spam téléphonique chez Free Mobile09.1216-06-2026
6spoof: A Simple HTTP Server for Test Environments01011-06-2026
7Introducing Workshop: launch sandboxed development environments on Ubuntu with a single command08.927-05-2026
8django-crawl - An in-process site crawler using Django’s test client028.1828-07-2026
9Creating Debian packages from upstream Git07.4626-05-2025
10Follow-up to Carrot disclosure: Forgejo07.330-04-2026

Классификация: . Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 8.42. Источник: dustri.org.