diff --git a/apis/base.go b/apis/base.go index 6336a878..6e6b243e 100644 --- a/apis/base.go +++ b/apis/base.go @@ -203,7 +203,11 @@ func updateTotalAdminsCache(app core.App) error { func uiCacheControl() echo.MiddlewareFunc { return func(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { - c.Response().Header().Set("Cache-Control", "max-age=1209600, stale-while-revalidate=86400") + // add default Cache-Control header for all Admin UI resources + // (ignoring the root admin path) + if c.Request().URL.Path != trailedAdminPath { + c.Response().Header().Set("Cache-Control", "max-age=1209600, stale-while-revalidate=86400") + } return next(c) }