INNER CODE UNIT · Python
is_endpoint_protected
fescobar/allure-docker-service · allure-docker-api/app.py:370
def is_endpoint_protected(endpoint):
if MAKE_VIEWER_ENDPOINTS_PUBLIC is False:
return True
for info in PROTECTED_ENDPOINTS:
if endpoint == info['endpoint']:
return True
return False
def is_endpoint_swagger_protected(method, path):
if MAKE_VIEWER_ENDPOINTS_PUBLIC is False:
return True
for info in PROTECTED_ENDPOINTS:
if info['method'] == method and path == info['path']:
return True
return False