mirror of
https://github.com/syssecfsu/witty.git
synced 2025-04-10 01:37:53 +02:00
set csrf.Path to / to have csrf across paths
This commit is contained in:
parent
0565e0309a
commit
614b63a76a
@ -30,7 +30,7 @@ func StartWeb(fp *os.File, cmd []string, naked bool, port uint16) {
|
||||
store := sessions.NewCookieStore([]byte(uniuri.NewLen(32)))
|
||||
rt.Use(sessions.Sessions("witty-session", store))
|
||||
|
||||
csrfHttp := csrf.Protect([]byte(uniuri.NewLen(32)))
|
||||
csrfHttp := csrf.Protect([]byte(uniuri.NewLen(32)), csrf.Path("/"))
|
||||
csrfGin := adapter.Wrap(csrfHttp)
|
||||
rt.Use(csrfGin)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user