Add setting for configuring optional URL prefix for /api (#14939)

* Add setting for configuring optional URL prefix for /api

Add OPTIONAL_API_URLPATTERN_PREFIX setting

examples:
- if set to `''` (empty string) API pattern will be `/api`
- if set to 'controller' API pattern will be `/api` AND `/api/controller`
This commit is contained in:
Hao Liu
2024-03-19 11:56:33 -04:00
committed by GitHub
parent 065bd3ae2a
commit ab593bda45
3 changed files with 19 additions and 2 deletions

View File

@@ -1126,3 +1126,8 @@ from ansible_base.lib import dynamic_config # noqa: E402
settings_file = os.path.join(os.path.dirname(dynamic_config.__file__), 'dynamic_settings.py')
include(settings_file)
# Add a postfix to the API URL patterns
# example if set to '' API pattern will be /api
# example if set to 'controller' API pattern will be /api AND /api/controller
OPTIONAL_API_URLPATTERN_PREFIX = ''