add x robots tag to resources
This commit is contained in:
parent
949a543aa9
commit
4fb3fa54ec
1 changed files with 2 additions and 2 deletions
|
@ -197,6 +197,7 @@ class ResourceView(BaseView):
|
||||||
context = self.context
|
context = self.context
|
||||||
ct = context.contentType
|
ct = context.contentType
|
||||||
response = self.request.response
|
response = self.request.response
|
||||||
|
response.setHeader('X-Robots-Tag', 'noindex, nofollow')
|
||||||
self.recordAccess('show', target=self.uniqueId)
|
self.recordAccess('show', target=self.uniqueId)
|
||||||
if ct.startswith('image/'):
|
if ct.startswith('image/'):
|
||||||
#response.setHeader('Cache-Control', 'public,max-age=86400')
|
#response.setHeader('Cache-Control', 'public,max-age=86400')
|
||||||
|
@ -482,4 +483,3 @@ class NoteView(DocumentView):
|
||||||
def linkUrl(self):
|
def linkUrl(self):
|
||||||
ad = self.typeAdapter
|
ad = self.typeAdapter
|
||||||
return ad and ad.linkUrl or ''
|
return ad and ad.linkUrl or ''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue