special case opt www.jvt.me out of new www redirect handling

for #314
pull/333/head
Ryan Barrett 2022-12-02 11:07:58 -08:00
rodzic 5249bb5a4f
commit 01c89fae2d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -17,6 +17,11 @@ from oauth_dropins.webutil.util import json_dumps, json_loads
import common
# https://github.com/snarfed/bridgy-fed/issues/314
WWW_DOMAINS = frozenset((
'www.jvt.me',
))
logger = logging.getLogger(__name__)
@ -134,7 +139,7 @@ class User(StringIdModel):
site = f'https://{domain}/'
logger.info(f'Verifying {site}')
if domain.startswith('www.'):
if domain.startswith('www.') and domain not in WWW_DOMAINS:
# if root domain redirects to www, use root domain instead
# https://github.com/snarfed/bridgy-fed/issues/314
root = domain.removeprefix("www.")