Set CORS to allow all origins (for now) (#41)

Reviewed-on: #41
This commit is contained in:
Sebastiaan de Schaetzen 2025-05-14 16:51:05 +02:00
parent cc817ed061
commit 790ee3c622

View File

@ -354,7 +354,9 @@ func start(ctx context.Context, config *ServerConfig) {
defer db.db.MustClose()
router := gin.Default()
router.Use(cors.Default())
router.Use(cors.New(cors.Config{
AllowOrigins: []string{"*"},
}))
router.GET("/api/users", getUsers)
router.GET("/api/user/:userId", getUser)
router.POST("/api/user/:userId/allowance", postAllowance)