Jelajahi Sumber

init server

Roc 6 bulan lalu
induk
melakukan
fc91fc893b
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  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)