Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

even farther future expires, use send_data to stream instead of File#…

…read
  • Loading branch information...
commit 0cbf37769ab048dfd3715e6e12be44c69edb8a64 1 parent 8cbf46e
@croaky croaky authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 app.rb
View
6 app.rb
@@ -7,8 +7,8 @@ class App < Sinatra::Base
set :app_file, __FILE__
before do
- headers 'Cache-Control' => 'public, max-age=86400',
- 'Expires' => (Time.now + 86400).httpdate,
+ headers 'Cache-Control' => 'public, max-age=31536000',
+ 'Expires' => (Time.now + 31536000).httpdate,
'Access-Control-Allow-Origin' => '*'
end
@@ -20,6 +20,6 @@ class App < Sinatra::Base
when /\.eot$/ then 'application/vnd.ms-fontobject'
when /\.svg$/ then 'image/svg+xml'
end
- open("#{ENV['S3_URL']}/#{params[:font_face]}").read
+ send_data open("#{ENV['S3_URL']}/#{params[:font_face]}")
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.