fix apiProxyHandler: stop stripping /api prefix, authelia-api needs it

This commit is contained in:
Claus Lohmar 2026-07-11 17:59:23 +01:00
parent a21e63c4a2
commit 1849c65c68
3 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 0.1.0.0036 — 2026-07-11
### Fixed
- Admin panel user management: `apiProxyHandler` was stripping `/api` prefix before forwarding to authelia-api, causing 404 on all `/api/users` calls. Removed the `TrimPrefix` — authelia-api expects the full `/api/...` path.
## 0.1.0.0035 — 2026-07-11
### Added

View file

@ -1 +1 @@
0.1.0.0035
0.1.0.0036

View file

@ -616,7 +616,7 @@ func apiProxyHandler(w http.ResponseWriter, r *http.Request) {
if token != "" {
r.Header.Set("Authorization", "Bearer "+token)
}
r.URL.Path = strings.TrimPrefix(r.URL.Path, "/api")
// Forward the full path (authelia-api expects /api/... prefix)
proxy.ServeHTTP(w, r)
}