CRSF 中間件由 gorilla/csrf 提供。

    1. import (
    2. "github.com/clevergo/clevergo"
    3. "github.com/gorilla/csrf"
    4. )
    1. m := csrf.Protect(
    2. []byte("32-byte-long-auth-key"),
    3. csrf.Secure(false), // 本地開發
    4. // 其他選項
    5. )
    6. router.Use(clevergo.WrapHH(m))