diff options
-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 |