mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 14:33:00 +00:00
add metrics_authentication decorator to /metrics API
This commit is contained in:
@@ -206,6 +206,10 @@ class BaseHandler(RequestHandler):
|
||||
def redirect_to_server(self):
|
||||
return self.settings.get('redirect_to_server', True)
|
||||
|
||||
@property
|
||||
def authenticate_prometheus(self):
|
||||
return self.settings.get('authenticate_prometheus', True)
|
||||
|
||||
def get_auth_token(self):
|
||||
"""Get the authorization token from Authorization header"""
|
||||
auth_header = self.request.headers.get('Authorization', '')
|
||||
|
Reference in New Issue
Block a user