only block suspended instances

This commit is contained in:
Izalia Mae 2020-01-13 21:03:07 -05:00
parent 1bc181a76c
commit bdb2d58157
2 changed files with 20 additions and 8 deletions

View file

@ -60,3 +60,13 @@ proxy /auth localhost:3001 {
Coming soon. Convert caddy's config to nginx format if you know how for now
### Mastodon
While it isn't necessary, I highly recommend turning on authorized fetches (v3.0+) to let PAWS pass json requests directly through to mastodon. Also upgrade to at least v3.0 to be able to properly interact with other instances that have auth fetches turned on.
.env.production:
```
AUTHORIZED_FETCH=true
```

View file

@ -52,15 +52,17 @@ def get_bans():
for domain in domains:
instance = domain['domain']
severity = domain['severity']
banlist[instance] = {
'severity': domain['severity'],
'media': bool_check(domain['reject_media']),
'reports': bool_check(domain['reject_reports']),
'private': domain['private_comment'],
'public': domain['public_comment'],
'updated': domain['updated_at']
}
if severity == 1:
banlist[instance] = {
'severity': domain['severity'],
'media': bool_check(domain['reject_media']),
'reports': bool_check(domain['reject_reports']),
'private': domain['private_comment'],
'public': domain['public_comment'],
'updated': domain['updated_at']
}
return banlist