Permalink
Browse files

use directory structure

  • Loading branch information...
1 parent 0693860 commit 7d808be000a73ee4ffd60a50dbd04fbe02c5509b @croaky croaky committed Nov 19, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 app.rb
View
@@ -16,14 +16,14 @@ class App < Sinatra::Base
open("#{ENV['S3_URL']}/#{params[:font_face]}.css").read
end
- get '/:font_face' do
+ get '/:directory/:font_face' do
headers['Content-Type'] = case params[:font_face]
when /\.ttf$/ then 'font/truetype'
when /\.otf$/ then 'font/opentype'
when /\.woff$/ then 'font/woff'
when /\.eot$/ then 'application/vnd.ms-fontobject'
when /\.svg$/ then 'image/svg+xml'
end
- open("#{ENV['S3_URL']}/#{params[:font_face]}").read
+ open("#{ENV['S3_URL']}/#{params[:directory]}/#{params[:font_face]}").read
end
end

0 comments on commit 7d808be

Please sign in to comment.