From: John Firebaugh Date: Wed, 6 Nov 2013 21:16:01 +0000 (-0800) Subject: Send appropriate Vary header X-Git-Tag: live~5173^2~170 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/261862a8dd3e5f84773d922b19a8c60dc3e1b3b0?ds=sidebyside Send appropriate Vary header Fixes an issue where the XHR response was sometimes displayed when navigating back to a pushState based history entry rather than the full page. --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 97ab5abfc..9c6ea3b33 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -423,6 +423,7 @@ class ApplicationController < ActionController::Base end def map_layout + response.headers['Vary'] = 'X-Requested-With' request.xhr? ? false : 'map' end