iris web server delete method forbidden code example
Example: iris web server delete method forbidden
#add below code snapt to iris web-server config
# import "github.com/iris-contrib/middleware/cors"
cors := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowCredentials: true,
AllowedHeaders: []string{"*"},
AllowedMethods: []string{"GET", "POST", "OPTIONS", "PUT", "DELETE"},
})
app := iris.New()
app.User(cors)