Unverified Commit bd96d8d3 authored by John Chilton's avatar John Chilton Committed by GitHub
Browse files

Merge pull request #9294 from dannon/no_cache_bootstrapped_client

[20.01] Prevent caching of bootstrapped client data
parents d525fd09 0688ec88
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -276,6 +276,10 @@ class JSAppLauncher(BaseUIController):
        return self._bootstrapped_client(trans, **kwd)

    def _bootstrapped_client(self, trans, app_name='analysis', **kwd):
        # This includes contextualized user options in the bootstrapped data; we don't want to cache it.
        trans.response.headers['Cache-Control'] = ['no-cache', 'no-store', 'must-revalidate']
        trans.response.headers['Pragma'] = 'no-cache'
        trans.response.headers['Expires'] = '0'
        js_options = self._get_js_options(trans)
        js_options['config'].update(self._get_extended_config(trans))
        return self.template(trans, app_name, options=js_options, **kwd)