default
This commit is contained in:
parent
e13586908a
commit
a4a6703aec
9
main.go
9
main.go
@ -20,12 +20,9 @@ const MONGO_URL_ENV_VAR = "MONGO_URL"
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
router.Use(cors.New(cors.Config{
|
cors_config := cors.DefaultConfig()
|
||||||
AllowOrigins: []string{"*"},
|
cors_config.AllowOrigins = []string{"*"}
|
||||||
AllowMethods: []string{"*"},
|
router.Use(cors.New(cors_config))
|
||||||
AllowHeaders: []string{"*"},
|
|
||||||
AllowCredentials: true,
|
|
||||||
}))
|
|
||||||
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 {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user