retr0h (owner)

Forks

Revisions

gist: 98308 Download_button fork
public
Public Clone URL: git://gist.github.com/98308.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
CONTENT_TYPES = {:html => 'text/html', :css => 'text/css', :js => 'application/javascript'}
 
before do
  request_uri = case request.env['REQUEST_URI']
    when /\.css$/ : :css
    when /\.js$/ : :js
    else :html
  end
  content_type CONTENT_TYPES[request_uri], :charset => 'utf-8'
end