]> git.openstreetmap.org Git - rails.git/commitdiff
Send appropriate Vary header
authorJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 6 Nov 2013 21:16:01 +0000 (13:16 -0800)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 6 Nov 2013 21:16:48 +0000 (13:16 -0800)
Fixes an issue where the XHR response was sometimes
displayed when navigating back to a pushState
based history entry rather than the full page.

app/controllers/application_controller.rb

index 97ab5abfc397036304e6e3f73311f80dea2ffa84..9c6ea3b33beb9009680f75a1338d6b6724760170 100644 (file)
@@ -423,6 +423,7 @@ class ApplicationController < ActionController::Base
   end
 
   def map_layout
   end
 
   def map_layout
+    response.headers['Vary'] = 'X-Requested-With'
     request.xhr? ? false : 'map'
   end
 
     request.xhr? ? false : 'map'
   end