feat(security): #286 implement csrf middleware
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user