File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -89,21 +89,25 @@ type options struct {
8989// package main
9090//
9191// import (
92- // "github.com/elithrar/protect"
92+ // "html/template"
93+ //
94+ // "github.com/gorilla/csrf"
9395// "github.com/gorilla/mux"
9496// )
9597//
98+ // var t = template.Must(template.New("signup_form.tmpl").Parse(form))
99+ //
96100// func main() {
97- // r := mux.NewRouter()
101+ // r := mux.NewRouter()
98102//
99- // mux.HandlerFunc ("/signup", GetSignupForm)
100- // // POST requests without a valid token will return a HTTP 403 Forbidden.
101- // mux.HandlerFunc ("/signup/post", PostSignupForm)
103+ // r.HandleFunc ("/signup", GetSignupForm)
104+ // // POST requests without a valid token will return a HTTP 403 Forbidden.
105+ // r.HandleFunc ("/signup/post", PostSignupForm)
102106//
103- // // Add the middleware to your router.
104- // http.ListenAndServe(":8000",
105- // // Note that the authentication key provided should be 32 bytes
106- // // long and persist across application restarts.
107+ // // Add the middleware to your router.
108+ // http.ListenAndServe(":8000",
109+ // // Note that the authentication key provided should be 32 bytes
110+ // // long and persist across application restarts.
107111// csrf.Protect([]byte("32-byte-long-auth-key"))(r))
108112// }
109113//
You can’t perform that action at this time.
0 commit comments