feat(security): #286 implement csrf middleware

This commit is contained in:
2024-12-04 23:15:40 +01:00
parent bbcdbf7a01
commit 57989c9b03
18 changed files with 484 additions and 204 deletions

View File

@@ -45,6 +45,12 @@ func Info(message string, args ...interface{}) {
func format(message string, args []interface{}) string {
var w strings.Builder
fmt.Fprintf(&w, message, args)
if len(args) > 0 {
fmt.Fprintf(&w, message, args...)
} else {
w.WriteString(message)
}
return w.String()
}