mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 18:52:56 +00:00
dev day #89
This commit is contained in:
@@ -41,7 +41,18 @@ func ValidateContentType() gin.HandlerFunc {
|
||||
path := c.Request.URL.Path
|
||||
|
||||
// Allow multipart for uploads and image processing crop upload
|
||||
if strings.Contains(path, "/upload") || strings.Contains(path, "/image-processing/crop-upload") {
|
||||
if strings.Contains(path, "/upload") || strings.Contains(path, "/image-processing/crop-upload") || strings.Contains(path, "/admin/scoreboard/qr") || strings.Contains(path, "/admin/scoreboard/load") {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
// Allow scoreboard timer control endpoints without requiring JSON body
|
||||
// These actions do not read request body and are triggered via simple POSTs from remote UI
|
||||
if strings.Contains(path, "/admin/scoreboard/timer/") {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
if strings.Contains(path, "/admin/scoreboard/swap-sides") || strings.Contains(path, "/admin/scoreboard/second-half") {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user