diff --git a/_examples/experimental-handlers/cors/simple/main.go b/_examples/experimental-handlers/cors/simple/main.go index 94593b08..c149044a 100644 --- a/_examples/experimental-handlers/cors/simple/main.go +++ b/_examples/experimental-handlers/cors/simple/main.go @@ -5,19 +5,16 @@ package main import ( "github.com/kataras/iris" - "github.com/kataras/iris/core/router" "github.com/iris-contrib/middleware/cors" ) func main() { - app := iris.New() // `crs := cors.NewAllowAllPartyMiddleware()`, or: crs := cors.NewPartyMiddleware(cors.Options{ AllowedOrigins: []string{"*"}, // allows everything, use that to change the hosts. - AllowedMethods: router.AllMethods[:], AllowCredentials: true, }) diff --git a/_examples/routing/fallback-handlers/main.go b/_examples/routing/fallback-handlers/main.go index 72a07d14..e9e6b2ec 100644 --- a/_examples/routing/fallback-handlers/main.go +++ b/_examples/routing/fallback-handlers/main.go @@ -17,7 +17,7 @@ func h(ctx iris.Context) { } func fallbackHandler(ctx iris.Context) { - if ctx.Method() == "DELETE" { + if ctx.Method() == iris.MethodDelete { ctx.NextOrNotFound() return }