mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-12 22:25:44 -04:00
Fix API crash
This commit is contained in:
parent
5295320b0b
commit
4213d7dc27
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ class NinjaAPIWithIOCapture(NinjaAPI):
|
|||
|
||||
# Add Auth Headers to response
|
||||
api_token = getattr(request, '_api_token', None)
|
||||
token_expiry = api_token.expires.isoformat() if api_token else 'Never'
|
||||
token_expiry = api_token.expires.isoformat() if api_token and api_token.expires else 'Never'
|
||||
|
||||
response['X-ArchiveBox-Auth-Method'] = getattr(request, '_api_auth_method', None) or 'None'
|
||||
response['X-ArchiveBox-Auth-Expires'] = token_expiry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue