key server: use total_seconds() for cache headers

This commit is contained in:
Jimmy Zelinskie 2016-04-14 15:40:42 -04:00 committed by Jimmy Zelinskie
parent 5d6e5a42e8
commit ca5794ba18

View file

@ -90,7 +90,6 @@ def get_service_key(service, kid):
resp = jsonify(key.jwk)
# Set the cache header to be a year for non-expiring keys.
lifetime = timedelta(days=365)
if key.expiration_date is not None:
lifetime = key.expiration_date - key.created_date