Make antispam-protected links also be javascript-triggered
authorMagnus Hagander <magnus@hagander.net>
Mon, 16 Jun 2025 08:44:01 +0000 (10:44 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 16 Jun 2025 09:16:21 +0000 (11:16 +0200)
commit616a02a79fa2bf4804adf5b73bf94c55343bc6df
treed8af7354d23d6affaa003a07e09e9f8b4d638537
parent8323c9dd4895694df4070d13ae14dc9f7dcdd34d
Make antispam-protected links also be javascript-triggered

This makes a tiny javascript run to convert it into a POST and then
receive that POST. The idea behind this is to remove the links from view
of crawlers (hello AI bots!) that completely ignore robots.txt, causing
lots of redirect chains on account of logins.

We still allow GET requests on those endpoints, as there are external
links pointing to them as well as people having scripts. But those are
at least to fewer emails than all.
django/archives/mailarchives/templates/_message.html
django/archives/mailarchives/templates/message.html
django/archives/mailarchives/templates/message_flat.html
django/archives/mailarchives/templates/message_resend.html
django/archives/mailarchives/views.py
django/media/js/main.js