Trying some other cors
This commit is contained in:
parent
cc817ed061
commit
e68f769464
@ -354,7 +354,9 @@ func start(ctx context.Context, config *ServerConfig) {
|
|||||||
defer db.db.MustClose()
|
defer db.db.MustClose()
|
||||||
|
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
router.Use(cors.Default())
|
router.Use(cors.New(cors.Config{
|
||||||
|
AllowOrigins: []string{"*"},
|
||||||
|
}))
|
||||||
router.GET("/api/users", getUsers)
|
router.GET("/api/users", getUsers)
|
||||||
router.GET("/api/user/:userId", getUser)
|
router.GET("/api/user/:userId", getUser)
|
||||||
router.POST("/api/user/:userId/allowance", postAllowance)
|
router.POST("/api/user/:userId/allowance", postAllowance)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user