mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
Correct http cache headers for firefox (#3017)
Co-authored-by: Luca Marinucci <luca.marinucci@devlux.ch> Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
parent
28bd6cc690
commit
5671956a31
2 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ import (
|
|||
// @Tags Events
|
||||
func EventStreamSSE(c *gin.Context) {
|
||||
c.Header("Content-Type", "text/event-stream")
|
||||
c.Header("Cache-Control", "no-cache")
|
||||
c.Header("Cache-Control", "no-store")
|
||||
c.Header("Connection", "keep-alive")
|
||||
c.Header("X-Accel-Buffering", "no")
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ func serveFile(f *prefixFS) func(ctx *gin.Context) {
|
|||
case strings.HasSuffix(ctx.Request.URL.Path, ".png"):
|
||||
mime = "image/png"
|
||||
case strings.HasSuffix(ctx.Request.URL.Path, ".svg"):
|
||||
mime = "image/svg"
|
||||
mime = "image/svg+xml"
|
||||
}
|
||||
ctx.Status(http.StatusOK)
|
||||
ctx.Writer.Header().Set("Cache-Control", "public, max-age=31536000")
|
||||
|
|
Loading…
Reference in a new issue