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.
This commit is contained in:
2026-06-26 20:41:30 +02:00
parent a2f42c6a12
commit db6da86c93
+2 -1
View File
@@ -5,7 +5,8 @@ module Volumen
module ApiRoutes module ApiRoutes
def self.registered(app) def self.registered(app)
app.before "/api/volumen/*" do app.before "/api/volumen/*" do
headers "Access-Control-Allow-Origin" => "*" headers "Access-Control-Allow-Origin" => "*",
"Cache-Control" => "public, max-age=60"
content_type :json content_type :json
end end