fix X-Requested-With Vary

This commit is contained in:
Laura Klünder 2017-10-28 21:49:30 +02:00
parent 8c52f9aed1
commit 737818c5e0

View file

@ -31,13 +31,13 @@ def sidebar_view(func=None, select_related=None):
if not isinstance(response, HttpResponseNotModified):
response.write(render(request, 'editor/fragment_nav.html', {}).content)
response['Cache-Control'] = 'no-cache'
patch_vary_headers(response, 'X-Requested-With')
patch_vary_headers(response, ('X-Requested-With', ))
return response
if isinstance(response, HttpResponseRedirect):
return response
response = render(request, 'editor/map.html', {'content': response.content})
response['Cache-Control'] = 'no-cache'
patch_vary_headers(response, 'X-Requested-With')
patch_vary_headers(response, ('X-Requested-With', ))
return response
return with_ajax_check