From db6da86c93946cf7681c0d6a4a7708768149d8c4 Mon Sep 17 00:00:00 2001 From: Petr Date: Fri, 26 Jun 2026 20:41:30 +0200 Subject: [PATCH] perf: add Cache-Control header to public API responses Set Cache-Control: public, max-age=60 on all /api/volumen/* endpoints so browsers and CDNs can cache responses for 60 seconds, reducing unnecessary re-fetches. --- lib/volumen/api_routes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/volumen/api_routes.rb b/lib/volumen/api_routes.rb index c531304..b2a3091 100644 --- a/lib/volumen/api_routes.rb +++ b/lib/volumen/api_routes.rb @@ -5,7 +5,8 @@ module Volumen module ApiRoutes def self.registered(app) app.before "/api/volumen/*" do - headers "Access-Control-Allow-Origin" => "*" + headers "Access-Control-Allow-Origin" => "*", + "Cache-Control" => "public, max-age=60" content_type :json end