Skip to content

Commit

Permalink
core: add pre-hydrated relative URL (#13243)
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu authored Feb 25, 2025
1 parent 91572b8 commit aa340fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions authentik/core/templates/base/header_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
build: "{{ build }}",
api: {
base: "{{ base_url }}",
relBase: "{{ base_url_rel }}",
},
};
window.addEventListener("DOMContentLoaded", function () {
Expand Down
1 change: 1 addition & 0 deletions authentik/core/views/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
kwargs["build"] = get_build_hash()
kwargs["url_kwargs"] = self.kwargs
kwargs["base_url"] = self.request.build_absolute_uri(CONFIG.get("web.path", "/"))
kwargs["base_url_rel"] = CONFIG.get("web.path", "/")
return super().get_context_data(**kwargs)


Expand Down

0 comments on commit aa340fb

Please sign in to comment.