Roc 6 ヶ月 前
コミット
fc91fc893b
1 ファイル変更3 行追加1 行削除
  1. 3 1
      controller/obs.go

+ 3 - 1
controller/obs.go

@@ -4,6 +4,7 @@ import (
 	"eta_gn/eta_obs/controller/resp"
 	"eta_gn/eta_obs/services/oss"
 	"github.com/gin-gonic/gin"
+	"strings"
 )
 
 type ObsController struct{}
@@ -14,8 +15,9 @@ type ObsController struct{}
 // @Router /auth/auth_code [post]
 func (a *ObsController) File(c *gin.Context) {
 	objPath := c.Request.URL.Path
+	objPath = strings.TrimLeft(objPath, "/")
 	// ico过滤
-	if objPath == `/favicon.ico` {
+	if objPath == `favicon.ico` {
 		return
 	}
 	ossClient := new(oss.MinioOss)