diff options
author | rautenberg <rautenberg@in-silico.ch> | 2013-10-21 11:00:04 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2013-10-21 11:00:04 +0200 |
commit | 6d6fdf889eace978aaacbde1335264c9fccaa874 (patch) | |
tree | 333401af90885dfb86fc61ee44fab0b309b1c678 | |
parent | a02524b66034757a16a54f3497c8a8393c482d38 (diff) |
before @accept
-rw-r--r-- | application.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/application.rb b/application.rb index f742442..53fd2f7 100644 --- a/application.rb +++ b/application.rb @@ -116,6 +116,11 @@ class Application < Sinatra::Base end end + before do + @accept = request.env['HTTP_ACCEPT'] + response['Content-Type'] = @accept + end + before '/pug/*' do content_type 'application/json' @result = CACHE.get request.path |