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
|
||||
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')
|
||||
|
@ -215,7 +216,7 @@ class ResourceView(BaseView):
|
|||
data = context.data
|
||||
if useAttachment:
|
||||
if filename is None:
|
||||
filename = (adapted(self.context).localFilename or
|
||||
filename = (adapted(self.context).localFilename or
|
||||
getName(self.context))
|
||||
if self.typeOptions('use_title_for_download_filename'):
|
||||
base, ext = os.path.splitext(filename)
|
||||
|
@ -482,4 +483,3 @@ class NoteView(DocumentView):
|
|||
def linkUrl(self):
|
||||
ad = self.typeAdapter
|
||||
return ad and ad.linkUrl or ''
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue