From ece4b6c8f9c4ce4dbcf3cd4aa2be3f9e3473fe13 Mon Sep 17 00:00:00 2001 From: Pulkit Kathuria Date: Wed, 3 Jan 2024 21:39:12 +0900 Subject: [PATCH] (fix) robots cache --- pkg/routes.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/routes.go b/pkg/routes.go index 80945fa..baee786 100644 --- a/pkg/routes.go +++ b/pkg/routes.go @@ -38,6 +38,7 @@ func SetupRoutes(e *echo.Echo, baseURL string, publicDir embed.FS) { // /robots.txt e.GET(baseURL+ROBOTS_FILE, func(c echo.Context) error { + c.Response().Header().Set("Cache-Control", "public, max-age=86400") return c.String(http.StatusOK, ROBOTS_TXT) })