Skip to content

Commit

Permalink
chore: resource cache control 30 day
Browse files Browse the repository at this point in the history
  • Loading branch information
whatwewant committed Oct 2, 2024
1 parent e8ed485 commit 4b2dc73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/route/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (s *ResourceService) streamResource(c echo.Context) error {
}
}

c.Response().Writer.Header().Set(echo.HeaderCacheControl, "max-age=3600")
c.Response().Writer.Header().Set(echo.HeaderCacheControl, "max-age=2592000")
c.Response().Writer.Header().Set(echo.HeaderContentSecurityPolicy, "default-src 'none'; script-src 'none'; img-src 'self'; media-src 'self'; sandbox;")
c.Response().Writer.Header().Set("Content-Disposition", fmt.Sprintf(`filename="%s"`, resource.Filename))
resourceType := strings.ToLower(resource.Type)
Expand Down

0 comments on commit 4b2dc73

Please sign in to comment.