1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

chore: uses trim instead

This commit is contained in:
Amir Raminfar
2025-09-25 14:05:23 -07:00
parent 5675389049
commit c4060b2206

View File

@@ -49,7 +49,7 @@ func (p *proxyAuthContext) AuthMiddleware(next http.Handler) http.Handler {
log.Fatal().Str("filter", r.Header.Get(p.headerFilter)).Msg("Failed to parse container filter")
}
userRoles := All
if r.Header.Get(p.headerRoles) != "" {
if strings.TrimSpace(r.Header.Get(p.headerRoles)) != "" {
userRoles = ParseRole(r.Header.Get(p.headerRoles))
}
user := newUser(r.Header.Get(p.headerUser), r.Header.Get(p.headerEmail), r.Header.Get(p.headerName), containerFilter, userRoles)