mirror of
https://github.com/syssecfsu/witty.git
synced 2025-05-07 15:17:34 +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)))
|
store := sessions.NewCookieStore([]byte(uniuri.NewLen(32)))
|
||||||
rt.Use(sessions.Sessions("witty-session", store))
|
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)
|
csrfGin := adapter.Wrap(csrfHttp)
|
||||||
rt.Use(csrfGin)
|
rt.Use(csrfGin)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user