added cors
This commit is contained in:
parent
a4a6703aec
commit
37bf73f336
2
main.go
2
main.go
@ -21,7 +21,7 @@ const MONGO_URL_ENV_VAR = "MONGO_URL"
|
|||||||
func main() {
|
func main() {
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
cors_config := cors.DefaultConfig()
|
cors_config := cors.DefaultConfig()
|
||||||
cors_config.AllowOrigins = []string{"*"}
|
cors_config.AllowOrigins = []string{"https://games.acooldomain.co"}
|
||||||
router.Use(cors.New(cors_config))
|
router.Use(cors.New(cors_config))
|
||||||
file, err := os.Open(os.Getenv(CONFIG_PATH_ENV_VAR))
|
file, err := os.Open(os.Getenv(CONFIG_PATH_ENV_VAR))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user