From 6d6fdf889eace978aaacbde1335264c9fccaa874 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 21 Oct 2013 11:00:04 +0200 Subject: before @accept --- application.rb | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3