add x robots tag to resources

This commit is contained in:
hplattner 2016-07-13 15:02:17 +02:00
parent 949a543aa9
commit 4fb3fa54ec

View file

@ -197,6 +197,7 @@ class ResourceView(BaseView):
context = self.context
ct = context.contentType
response = self.request.response
response.setHeader('X-Robots-Tag', 'noindex, nofollow')
self.recordAccess('show', target=self.uniqueId)
if ct.startswith('image/'):
#response.setHeader('Cache-Control', 'public,max-age=86400')
@ -482,4 +483,3 @@ class NoteView(DocumentView):
def linkUrl(self):
ad = self.typeAdapter
return ad and ad.linkUrl or ''