From 261862a8dd3e5f84773d922b19a8c60dc3e1b3b0 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 6 Nov 2013 13:16:01 -0800 Subject: [PATCH] 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. --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.5