Always vary cached schema on Cookie and Authorization

This is needed to play nice with session auth on the schema view and with CurrentUserDefault.
This commit is contained in:
Cristi Vîjdea committed 2018-01-02 16:14:00 +01:00
1 parent caa397b906
commit f81795d745
2 files changed
+4 -5

No files matched your search

+1 -2
View File
@@ -94,8 +94,7 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
Arguments described in :meth:`.as_cached_view`.
"""
if not cls.public:
view = vary_on_headers('Cookie', 'Authorization')(view)
view = vary_on_headers('Cookie', 'Authorization')(view)
view = cache_page(cache_timeout, **cache_kwargs)(view)
view = deferred_never_cache(view) # disable in-browser caching
return view