AP-45 #57

Merged
Huffle merged 5 commits from AP-45 into main 2025-05-18 16:18:08 +02:00
Showing only changes of commit 505faa95a3 - Show all commits

View File

@ -506,9 +506,11 @@ func start(ctx context.Context, config *ServerConfig) {
defer db.db.MustClose()
router := gin.Default()
router.Use(cors.New(cors.Config{
AllowOrigins: []string{"*"},
}))
corsConfig := cors.DefaultConfig()
corsConfig.AllowAllOrigins = true
router.Use(cors.New(corsConfig))
router.GET("/api/users", getUsers)
router.GET("/api/user/:userId", getUser)
router.POST("/api/user/:userId/history", postHistory)