add cache-control headers to /keys
This commit is contained in:
parent
b515548f11
commit
bcdbf0301d
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,7 @@ from endpoints.common import common_login, render_page_template, route_show_if,
|
|||
from endpoints.csrf import csrf_protect, generate_csrf_token, verify_csrf
|
||||
from endpoints.decorators import anon_protect, anon_allowed
|
||||
from health.healthcheck import get_healthchecker
|
||||
from util.cache import no_cache
|
||||
from util.cache import no_cache, cache_control
|
||||
from util.headers import parse_basic_auth
|
||||
from util.invoice import renderInvoiceToPdf
|
||||
from util.names import parse_repository_name, parse_repository_name_and_tag
|
||||
|
@ -692,6 +692,7 @@ def _load_certificate_bytes(certificate_file_path):
|
|||
return load_pem_x509_certificate(cert_file.read(), default_backend()).public_key()
|
||||
|
||||
@route_show_if(features.BITTORRENT)
|
||||
@cache_control(max_age=300)
|
||||
@web.route('/keys', methods=['GET'])
|
||||
def jwk_set_uri():
|
||||
certificate = _load_certificate_bytes(app.config['JWT_AUTH_CERTIFICATE_PATH'])
|
||||
|
|
Reference in a new issue