Skip to content

Commit

Permalink
[docs] Mentions passing csrf.Secure(false) in local dev environments.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneashleyberry authored and elithrar committed Sep 1, 2016
1 parent a9c30ae commit a8abe8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ in order to protect malicious POST requests being made:
// Add the middleware to your router by wrapping it.
http.ListenAndServe(":8000",
csrf.Protect([]byte("32-byte-long-auth-key"))(r))
// PS: Don't forget to pass csrf.Secure(false) if you're developing locally
// over plain HTTP (just don't leave it on in production).
}
func ShowSignupForm(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit a8abe8a

Please sign in to comment.