feat: improve HandleScim()

This commit is contained in:
hsluoyz 2025-01-22 16:15:19 +08:00
parent f01839123f
commit 3d12ac8dc2

View File

@ -21,6 +21,11 @@ import (
) )
func (c *RootController) HandleScim() { func (c *RootController) HandleScim() {
_, ok := c.RequireAdmin()
if !ok {
return
}
path := c.Ctx.Request.URL.Path path := c.Ctx.Request.URL.Path
c.Ctx.Request.URL.Path = strings.TrimPrefix(path, "/scim") c.Ctx.Request.URL.Path = strings.TrimPrefix(path, "/scim")
scim.Server.ServeHTTP(c.Ctx.ResponseWriter, c.Ctx.Request) scim.Server.ServeHTTP(c.Ctx.ResponseWriter, c.Ctx.Request)