From 4b2dc73d5681e71439afd4716d925a7289ac36d1 Mon Sep 17 00:00:00 2001 From: Zero Date: Wed, 2 Oct 2024 12:40:51 +0800 Subject: [PATCH] chore: resource cache control 30 day --- server/route/resource/resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/route/resource/resource.go b/server/route/resource/resource.go index 7e977f904f660..497de00efb8fb 100644 --- a/server/route/resource/resource.go +++ b/server/route/resource/resource.go @@ -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)