key server: use total_seconds() for cache headers
This commit is contained in:
parent
5d6e5a42e8
commit
ca5794ba18
1 changed files with 0 additions and 1 deletions
|
@ -90,7 +90,6 @@ def get_service_key(service, kid):
|
||||||
|
|
||||||
resp = jsonify(key.jwk)
|
resp = jsonify(key.jwk)
|
||||||
|
|
||||||
# Set the cache header to be a year for non-expiring keys.
|
|
||||||
lifetime = timedelta(days=365)
|
lifetime = timedelta(days=365)
|
||||||
if key.expiration_date is not None:
|
if key.expiration_date is not None:
|
||||||
lifetime = key.expiration_date - key.created_date
|
lifetime = key.expiration_date - key.created_date
|
||||||
|
|
Reference in a new issue