Skip to content

Commit

Permalink
Disable Prone Protect into recent updates view
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Aug 2, 2017
1 parent efb2d97 commit 8800a06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/collective/liveblog/browser/recent_updates.py
Expand Up @@ -3,7 +3,9 @@
from collective.liveblog.browser.base import BaseView
from collective.liveblog.logger import logger
from datetime import datetime
from plone.protect.interfaces import IDisableCSRFProtection
from time import time
from zope.interface import alsoProvides
from zope.publisher.browser import BrowserView


Expand Down Expand Up @@ -79,6 +81,7 @@ def __call__(self):
# clients will wait that time before requesting the page again
expires = rfc1123_date(time() + 59) # page expires in 59 seconds
last_modified = rfc1123_date(self.context.modified())
alsoProvides(self.request, IDisableCSRFProtection)
self.request.RESPONSE.setHeader('Cache-Control', 'public')
self.request.RESPONSE.setHeader('Expires', expires)
self.request.RESPONSE.setHeader('Last-Modified', last_modified)
Expand Down

0 comments on commit 8800a06

Please sign in to comment.