Commit 2bdcb27e by xuzhenhao

修改了返回头

1 parent 15c300e5
Showing with 4 additions and 4 deletions
......@@ -11,10 +11,10 @@ import (
func initRouter() *gin.Engine {
router := gin.Default()
config := cors.DefaultConfig()
config.AllowOrigins = []string{"http://127.0.0.1:8000"}
config.AllowCredentials = true
router.Use(cors.New(config))
// config := cors.DefaultConfig()
// config.AllowOrigins = []string{"http://127.0.0.1:8000", "http://47.95.36.186:8000", "http://47.95.36.186:8402", "http://47.95.36.186:8401"}
// config.AllowCredentials = true
router.Use(cors.Default())
router.POST("user/login", UserLoginApi)
router.POST("user/register", UserRegisterApi)
router.POST("user/checkusername", CheckUserNameRepeatApi)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!