lbry-sdk/lbry/extras/daemon/security.py

6 lines
200 B
Python
Raw Normal View History

def is_request_allowed(request, conf) -> bool:
origin = request.headers.get('Origin', 'null')
if origin == 'null' or conf.allowed_origin in ('*', origin):
return True
return False