mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-10-28 15:41:16 +00:00
dev day #99
This commit is contained in:
1 parent
c941313fd5
commit
f5b6f83974
108 files changed
+8642
-5871
No files matched your search
@@ -57,6 +57,11 @@ func ValidateContentType() gin.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
if strings.Contains(path, "/rembg/start") {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
// Require JSON for other API endpoints
|
||||
if !strings.Contains(contentType, "application/json") {
|
||||
c.JSON(http.StatusUnsupportedMediaType, gin.H{
|
||||
@@ -127,6 +132,6 @@ func LogSecurityEvent(c *gin.Context, eventType string, details map[string]inter
|
||||
}
|
||||
|
||||
// Log to your logger
|
||||
// logger.Warn("SECURITY_EVENT: type=%s user_id=%d ip=%s path=%s",
|
||||
// logger.Warn("SECURITY_EVENT: type=%s user_id=%d ip=%s path=%s",
|
||||
// event.Type, event.UserID, event.IP, event.Path)
|
||||
}
|
||||
Reference in new issue
Block a user