Change AllowOrigin from everything to Svelte frontend
This commit is contained in:
parent
fdc3ca101c
commit
bfa8445f78
|
@ -32,7 +32,7 @@ func main() {
|
||||||
r := gin.Default()
|
r := gin.Default()
|
||||||
docs.SwaggerInfo.BasePath = "/api"
|
docs.SwaggerInfo.BasePath = "/api"
|
||||||
r.Use(cors.New(cors.Config{
|
r.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: []string{"*"},
|
AllowOrigins: []string{"http://localhost:5173"},
|
||||||
AllowMethods: []string{"GET", "DELETE", "PUT", "PATCH", "OPTIONS"},
|
AllowMethods: []string{"GET", "DELETE", "PUT", "PATCH", "OPTIONS"},
|
||||||
AllowHeaders: []string{"Origin", "Content-Type"},
|
AllowHeaders: []string{"Origin", "Content-Type"},
|
||||||
ExposeHeaders: []string{"Content-Length"},
|
ExposeHeaders: []string{"Content-Length"},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user