mirror of
https://github.com/arnaucube/gogame.git
synced 2026-02-08 03:56:39 +01:00
allow cors origin in config file, move resources from user to planet
This commit is contained in:
@@ -24,7 +24,7 @@ var gameservice *gamesrv.Service
|
||||
func newApiService() *gin.Engine {
|
||||
api := gin.Default()
|
||||
api.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"http://127.0.0.1:8080"},
|
||||
AllowOrigins: []string{serverConfig.Server.CorsOriginsAllowed},
|
||||
AllowMethods: []string{"GET", "POST"},
|
||||
AllowHeaders: []string{"Authorization", "Content-Type"},
|
||||
AllowCredentials: true,
|
||||
|
||||
Reference in New Issue
Block a user