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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user