fix apiProxyHandler: stop stripping /api prefix, authelia-api needs it
This commit is contained in:
parent
a21e63c4a2
commit
1849c65c68
3 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
0.1.0.0035
|
||||
0.1.0.0036
|
||||
|
|
|
|||
2
main.go
2
main.go
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue