mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 10:07:22 +00:00
add csrf check
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user