Fix hardcoded localhost fallback
This commit is contained in:
@@ -224,7 +224,8 @@ def logout():
|
|||||||
@ui_bp.get("/docs")
|
@ui_bp.get("/docs")
|
||||||
def docs_page():
|
def docs_page():
|
||||||
principal = _current_principal()
|
principal = _current_principal()
|
||||||
api_base = current_app.config.get("API_BASE_URL") or "http://127.0.0.1:5000"
|
# Use the current request's host as the default API base if not configured
|
||||||
|
api_base = current_app.config.get("API_BASE_URL") or request.host_url
|
||||||
api_base = api_base.rstrip("/")
|
api_base = api_base.rstrip("/")
|
||||||
parsed = urlparse(api_base)
|
parsed = urlparse(api_base)
|
||||||
api_host = parsed.netloc or parsed.path or api_base
|
api_host = parsed.netloc or parsed.path or api_base
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"""Central location for the application version string."""
|
"""Central location for the application version string."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
APP_VERSION = "0.1.1"
|
APP_VERSION = "0.1.2"
|
||||||
|
|
||||||
|
|
||||||
def get_version() -> str:
|
def get_version() -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user