forked from kenzuya/unshackle
feat(service): add GEOBLOCK negative geofence
Regions in GEOBLOCK refuse the service and everything else is allowed. A hit stops the run with a region error instead of auto-proxying; the check also covers proxy exits and the remote-dl client region.
This commit is contained in:
@@ -74,6 +74,8 @@ class MUSIC_EXAMPLE(Service):
|
||||
ALIASES = ("MUSICEX", "MUSICDOMAIN")
|
||||
# GEOFENCE: regions required; the framework warns/blocks if proxy region mismatches.
|
||||
GEOFENCE = ("US", "UK")
|
||||
# GEOBLOCK: the negative form; regions where the service refuses to work, all others allowed.
|
||||
# GEOBLOCK = ("GB",)
|
||||
# TITLE_RE: named groups (?P<...>) parsed in get_titles(). Accepts URL or bare id.
|
||||
# A music catalogue is addressed by several kinds of thing, so `kind`
|
||||
# is part of the identifier and decides which endpoint get_titles() asks.
|
||||
|
||||
Reference in New Issue
Block a user