feat: add head_images

This commit is contained in:
yanghao05
2025-04-18 15:31:37 +08:00
parent fe53565432
commit 55ae68be34
3 changed files with 83 additions and 7 deletions

View File

@@ -18,7 +18,10 @@ func (f *Middlewares) Auth(ctx fiber.Ctx) error {
if strings.HasPrefix(ctx.Path(), "/v1/admin/") {
token := ctx.Get("Authorization")
if token == "" {
return ctx.Status(fiber.StatusUnauthorized).SendString("Unauthorized")
token = ctx.Query("token")
if token == "" {
return ctx.Status(fiber.StatusUnauthorized).SendString("Unauthorized")
}
}
jwt, err := f.jwt.Parse(token)
if err != nil {