Skip to content
Snippets Groups Projects
Verified Commit a1c6bc29 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Fix base URL in production if not configured

parent 99a4576c
No related branches found
No related tags found
2 merge requests!1237Release 3.0,!1183Release 3.0
Pipeline #115060 canceled
......@@ -33,6 +33,8 @@ Removed
* Official support for views rendered server-side in Django is removed. The
`LegacyBaseTemplate` provided for backwards compatibility must not be used
by apps declaring a dependency on AlekSIS >= 3.0.
* Support for deploying AlekSIS in sub-URLs
* Support for production deployments without HTTPS
Deprecated
~~~~~~~~~~
......
......@@ -68,7 +68,8 @@ DJANGO_VITE_DEV_SERVER_PORT = DEV_SERVER_PORT + 1
ALLOWED_HOSTS = _settings.get("http.allowed_hosts", [getfqdn(), "localhost", "127.0.0.1", "[::1]"])
BASE_URL = _settings.get(
"http.base_url", f"http://localhost:{DEV_SERVER_PORT}" if DEBUG else f"//{ALLOWED_HOSTS[0]}"
"http.base_url",
f"http://localhost:{DEV_SERVER_PORT}" if DEBUG else f"https://{ALLOWED_HOSTS[0]}",
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment