add /debug/url-info path

This commit is contained in:
burnettk 2023-09-11 20:17:10 -04:00
parent d935def567
commit f15b8c5c08
3 changed files with 20 additions and 0 deletions

View File

@ -172,6 +172,20 @@ paths:
schema:
$ref: "#/components/schemas/OkTrue"
/debug/url-info:
get:
operationId: spiffworkflow_backend.routes.debug_controller.url_info
summary: Returns information about the url of the application
tags:
- Status
responses:
"200":
description: Returns url info
content:
application/json:
schema:
$ref: "#/components/schemas/OkTrue"
/debug/version-info:
get:
operationId: spiffworkflow_backend.routes.debug_controller.version_info

View File

@ -1,5 +1,6 @@
"""APIs for dealing with process groups, process models, and process instances."""
from flask import make_response
from flask import request
from flask.wrappers import Response
from spiffworkflow_backend import get_version_info_data
@ -11,3 +12,7 @@ def test_raise_error() -> Response:
def version_info() -> Response:
return make_response(get_version_info_data(), 200)
def url_info() -> Response:
return make_response({"url": request.url}, 200)

View File

@ -284,6 +284,7 @@ class AuthorizationService:
and api_view_function.__name__.startswith("login")
or api_view_function.__name__.startswith("logout")
or api_view_function.__name__.startswith("prom")
or api_view_function.__name__ == "url_info"
or api_view_function.__name__.startswith("metric")
or api_view_function.__name__.startswith("console_ui_")
or api_view_function.__name__ in authentication_exclusion_list