fix(images): 私有图片支持 Bearer 鉴权,画布节点改为带鉴权 blob 加载
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"backend/internal/config"
|
||||
"backend/internal/service"
|
||||
"backend/internal/storage"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -55,6 +56,7 @@ func (h *ImageHandler) Serve(c *gin.Context) {
|
||||
if !public {
|
||||
authorized, err := h.imageAccess.IsAuthorized(
|
||||
c.Request.Context(),
|
||||
c.GetHeader("Authorization"),
|
||||
readCookie(c, h.cfg.SessionCookieName),
|
||||
user,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user