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.
This commit is contained in:
John Firebaugh 2013-11-06 13:16:01 -08:00
parent 0a040c7a79
commit 261862a8dd

View file

@ -423,6 +423,7 @@ class ApplicationController < ActionController::Base
end
def map_layout
response.headers['Vary'] = 'X-Requested-With'
request.xhr? ? false : 'map'
end