Skip to content

Commit f833d7f

Browse files
committed
minor
1 parent beb0c8d commit f833d7f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

csrf/_example/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
func main() {
2020
app := iris.New()
21-
app.RegisterView(iris.HTML("./views", ".html"))
21+
app.Logger().SetLevel("debug")
2222

2323
CSRF := csrf.Protect(
2424
// Note that the authentication key provided should be 32 bytes

csrf/csrf.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ import (
77
"net/url"
88

99
"github.com/kataras/iris/v12"
10+
"github.com/kataras/iris/v12/context"
1011
)
1112

13+
func init() {
14+
context.SetHandlerName("github.com/iris-contrib/middleware/csrf.*", "iris.csrf.token")
15+
}
16+
1217
// CSRF token length in bytes.
1318
const tokenLength = 32
1419

csrf/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/gorilla/csrf
1+
module github.com/iris-contrib/middleware/csrf
22

33
go 1.15
44

0 commit comments

Comments
 (0)