Zhou Xiaoning 5 rokov pred
rodič
commit
3f442bb59f
1 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 1 2
      routers/router.go

+ 1 - 2
routers/router.go

@@ -14,7 +14,6 @@ import (
 	"mtp2_if/controllers/wrtrade"
 	"mtp2_if/logger"
 	"mtp2_if/token"
-	"net/http"
 	"time"
 
 	"github.com/gin-gonic/gin"
@@ -189,7 +188,7 @@ func CORSMiddleware() gin.HandlerFunc {
 		c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT")
 		c.Writer.Header().Set("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type, X-session-Token")
 		if c.Request.Method == "OPTIONS" {
-			c.AbortWithStatus(http.StatusNoContent)
+			// c.AbortWithStatus(http.StatusNoContent)
 			return
 		}