Skip to content

Commit

Permalink
in case there is an different format for request
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Dec 31, 2024
1 parent afa36ca commit 603628b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion htsget_server/authz.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ def has_full_authz(request):
return True
if "Authorization" in request.headers:
try:
return authx.auth.is_site_admin(AuthzRequest(request.headers, request.method, request.url.path))
if hasattr(request, "url"):
return authx.auth.is_site_admin(AuthzRequest(request.headers, request.method, request.url.path))
else:
return authx.auth.is_site_admin(AuthzRequest(request.headers, request.method, request.path))
except Exception as e:
logger.warning(f"Couldn't authorize for full access: {type(e)} {str(e)}")
return False
Expand Down

0 comments on commit 603628b

Please sign in to comment.