|
@@ -34,8 +34,9 @@ func main() {
|
|
opts := cors.Options{
|
|
opts := cors.Options{
|
|
AllowedOrigins: []string{"*"},
|
|
AllowedOrigins: []string{"*"},
|
|
AllowedHeaders: []string{"Content-Type"},
|
|
AllowedHeaders: []string{"Content-Type"},
|
|
- AllowedMethods: []string{"POST,GET,DELETE,PUT"},
|
|
|
|
|
|
+ AllowedMethods: []string{"POST", "GET", "DELETE", "PUT"},
|
|
ExposedHeaders: []string{"X-Header"},
|
|
ExposedHeaders: []string{"X-Header"},
|
|
|
|
+ Debug: true,
|
|
}
|
|
}
|
|
app.Use(cors.New(opts))
|
|
app.Use(cors.New(opts))
|
|
app.AllowMethods(iris.MethodOptions)
|
|
app.AllowMethods(iris.MethodOptions)
|