florence-social / mastodon-fork

Florence's fork of Mastodon
GNU Affero General Public License v3.0
138 stars 15 forks source link

Block Gab's user agent in the server configuration #133

Open jhaye opened 5 years ago

jhaye commented 5 years ago

It has been pointed out by @maxine@social.mootech.eu that Gab's fork uses a custom user agent for fetches. This user agent can be blocked by nginx by altering its configuration as follows:

add
if ($http_user_agent ~* (gabsocial)) {
return 403;
}

A few things that need to be done:

While this protection is trivial to bypass, the developer of Gab seems to insist on their own branding of the fork, so I would say this is worth doing.

vitunvuohi commented 5 years ago

A lot of folks are using 444 to immediately close the connection, might be a better option?