summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2015-03-16 16:31:55 -0400
committerRob Crittenden <rcritten@redhat.com>2015-03-19 16:57:55 -0400
commit83ec7148841303516fe31e76116b70c8a5f73aab (patch)
tree7e7e2b09526abc607ca31c4432379edad7f12703
parentb5730c293fc532fffd3f3300a14813027c4242ae (diff)
downloadipsilon-83ec7148841303516fe31e76116b70c8a5f73aab.zip
ipsilon-83ec7148841303516fe31e76116b70c8a5f73aab.tar.gz
ipsilon-83ec7148841303516fe31e76116b70c8a5f73aab.tar.xz
Set Cache-control on all generated pages, centralize in Endpoint
See "Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0" section 3.2.3.2. https://fedorahosted.org/ipsilon/ticket/7 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-by: Nathan Kinder <nkinder@redhat.com>
-rw-r--r--ipsilon/admin/common.py5
-rw-r--r--ipsilon/providers/openid/meta.py5
-rw-r--r--ipsilon/rest/common.py5
-rw-r--r--ipsilon/util/endpoint.py5
-rw-r--r--ipsilon/util/page.py1
5 files changed, 4 insertions, 17 deletions
diff --git a/ipsilon/admin/common.py b/ipsilon/admin/common.py
index fd20077..b371fe9 100644
--- a/ipsilon/admin/common.py
+++ b/ipsilon/admin/common.py
@@ -39,11 +39,6 @@ class AdminPage(Page):
def __init__(self, *args, **kwargs):
super(AdminPage, self).__init__(*args, **kwargs)
- self.default_headers.update({
- 'Cache-Control': 'no-cache, must-revalidate',
- 'Pragma': 'no-cache',
- 'Expires': 'Thu, 01 Dec 1994 16:00:00 GMT',
- })
self.auth_protect = True
diff --git a/ipsilon/providers/openid/meta.py b/ipsilon/providers/openid/meta.py
index 440ef1e..6e66120 100644
--- a/ipsilon/providers/openid/meta.py
+++ b/ipsilon/providers/openid/meta.py
@@ -9,11 +9,6 @@ class MetaHandler(ProviderPageBase):
def __init__(self, *args, **kwargs):
super(MetaHandler, self).__init__(*args, **kwargs)
- self.default_headers.update({
- 'Cache-Control': 'no-cache, must-revalidate',
- 'Pragma': 'no-cache',
- 'Expires': 'Thu, 01 Dec 1994 16:00:00 GMT',
- })
self._template_name = None
self._take_args = False
diff --git a/ipsilon/rest/common.py b/ipsilon/rest/common.py
index 4103e8e..7baea94 100644
--- a/ipsilon/rest/common.py
+++ b/ipsilon/rest/common.py
@@ -36,11 +36,6 @@ class RestPage(Endpoint):
def __init__(self, *args, **kwargs):
super(RestPage, self).__init__(*args, **kwargs)
- self.default_headers.update({
- 'Cache-Control': 'no-cache, must-revalidate',
- 'Pragma': 'no-cache',
- 'Expires': 'Thu, 01 Dec 1994 16:00:00 GMT',
- })
self.auth_protect = True
diff --git a/ipsilon/util/endpoint.py b/ipsilon/util/endpoint.py
index f6fd667..f160329 100644
--- a/ipsilon/util/endpoint.py
+++ b/ipsilon/util/endpoint.py
@@ -16,7 +16,10 @@ class Endpoint(Log):
self._site = site
self.basepath = cherrypy.config.get('base.mount', "")
self.user = None
- self.default_headers = dict()
+ self.default_headers = {
+ 'Cache-Control': 'no-cache, no-store, must-revalidate, private',
+ 'Pragma': 'no-cache',
+ }
self.auth_protect = False
def get_url(self):
diff --git a/ipsilon/util/page.py b/ipsilon/util/page.py
index 7e88534..21c9e3e 100644
--- a/ipsilon/util/page.py
+++ b/ipsilon/util/page.py
@@ -49,7 +49,6 @@ class Page(Endpoint):
self.basepath = cherrypy.config.get('base.mount', "")
self.user = None
self._is_form_page = form
- self.default_headers = dict()
self.auth_protect = False
def get_url(self):