add csrf check

This commit is contained in:
slene committed 2014-03-23 01:44:02 +08:00
1 parent 01e781dedb
commit 076fc98d98
18 files changed
+208 -46

No files matched your search

+4 -1
View File
@@ -242,8 +242,11 @@ func (r *Render) HTMLString(name string, binding interface{}, htmlOpt ...HTMLOpt
}
}
func (r *Render) Error(status int) {
func (r *Render) Error(status int, message ...string) {
r.WriteHeader(status)
if len(message) > 0 {
r.Write([]byte(message[0]))
}
}
func (r *Render) Redirect(location string, status ...int) {