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 e6bc79e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@ Changelog
1.2b2 (unreleased)
------------------

- Nothing changed yet.
- Disable Prone Protect into recent updates view.
[rodfersou]


1.2b1 (2016-06-21)
Expand Down
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 e6bc79e

Please sign in to comment.