set origin to avoid cors problems
This commit is contained in:
parent
f07131264f
commit
e051c1d17f
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ func NewRouter(deps Deps) interfaces.Router {
|
||||||
}
|
}
|
||||||
|
|
||||||
engine.Use(cors.New(cors.Config{
|
engine.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: []string{"*"},
|
AllowOrigins: []string{"http://localhost:5173"},
|
||||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
||||||
AllowHeaders: []string{"Origin", "Content-Type", "Authorization"},
|
AllowHeaders: []string{"Origin", "Content-Type", "Authorization"},
|
||||||
ExposeHeaders: []string{"Content-Length"},
|
ExposeHeaders: []string{"Content-Length"},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue