From 439fc561d2a4929fc82b58bc706a49cc95826eb6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 24 Apr 2026 11:48:19 +0200 Subject: [PATCH] Protect dictionary from bots. --- src/dictionary/urls.py | 3 ++- src/wolnelektury/static/root/robots.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dictionary/urls.py b/src/dictionary/urls.py index 8f11ac8ec..541344576 100644 --- a/src/dictionary/urls.py +++ b/src/dictionary/urls.py @@ -1,9 +1,10 @@ # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # +from django.contrib.auth.decorators import login_required from django.urls import path from dictionary.views import NotesView urlpatterns = [ - path('', NotesView.as_view(), name='dictionary_notes'), + path('', login_required(NotesView.as_view()), name='dictionary_notes'), ] diff --git a/src/wolnelektury/static/root/robots.txt b/src/wolnelektury/static/root/robots.txt index 913cfaae8..a67966478 100644 --- a/src/wolnelektury/static/root/robots.txt +++ b/src/wolnelektury/static/root/robots.txt @@ -7,4 +7,4 @@ Disallow: /szukaj/ Disallow: /uzytkownik/ Disallow: /zegar/ Disallow: /katalog/custompdf/ - +Disallow: /przypisy/ -- 2.20.1