feat: add head_images
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user