CORS
This commit is contained in:
@@ -13,7 +13,7 @@ func Run() {
|
|||||||
r.Use(cors.New(cors.Config{
|
r.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: []string{"http://localhost:4000"},
|
AllowOrigins: []string{"http://localhost:4000"},
|
||||||
AllowMethods: []string{"GET", "POST", "DELETE", "PATCH"},
|
AllowMethods: []string{"GET", "POST", "DELETE", "PATCH"},
|
||||||
AllowHeaders: []string{"Origin", "Content-Type"},
|
AllowHeaders: []string{"Origin", "Content-Type", "Authorization"},
|
||||||
ExposeHeaders: []string{"Content-Length"},
|
ExposeHeaders: []string{"Content-Length"},
|
||||||
AllowCredentials: true,
|
AllowCredentials: true,
|
||||||
AllowOriginFunc: func(origin string) bool {
|
AllowOriginFunc: func(origin string) bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user