mirror of
https://github.com/Dvorinka/ClubLogos.git
synced 2026-06-04 12:02:56 +00:00
cors
This commit is contained in:
@@ -282,6 +282,10 @@ func getLogo(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set CORS headers explicitly for file serving
|
||||||
|
c.Header("Access-Control-Allow-Origin", "*")
|
||||||
|
c.Header("Access-Control-Allow-Methods", "GET, OPTIONS")
|
||||||
|
c.Header("Access-Control-Allow-Headers", "*")
|
||||||
c.Header("Content-Type", contentType)
|
c.Header("Content-Type", contentType)
|
||||||
c.Header("Cache-Control", "public, max-age=31536000")
|
c.Header("Cache-Control", "public, max-age=31536000")
|
||||||
c.File(logoPath)
|
c.File(logoPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user