D
D
Denis Sokolov2022-04-10 16:33:36
go
Denis Sokolov, 2022-04-10 16:33:36

Why does one have CORS and the other doesn't?

Why does it write an error with CORS on a get request and does not ask for anything on a POST request?

router := gin.New()
  router.Use(cors.Default())

  auth := router.Group("/auth")
  {
    auth.GET("/", h.GetAuthHandler)
    auth.POST("/sign-up", h.SignUpHandler)
    auth.POST("/sign-in", h.SignInHandler)
  }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question