From 040997b3226d4c37172c3c407b9498dfc5300700 Mon Sep 17 00:00:00 2001 From: hplattner Date: Wed, 13 Jul 2016 16:06:58 +0200 Subject: [PATCH] use options to determin x robots tag --- browser/resource.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser/resource.py b/browser/resource.py index 15f4518..2b5d8ce 100644 --- a/browser/resource.py +++ b/browser/resource.py @@ -197,7 +197,9 @@ class ResourceView(BaseView): context = self.context ct = context.contentType response = self.request.response - response.setHeader('X-Robots-Tag', 'noindex, nofollow') + if self.typeOptions('x_robots_tag_header', None) is not None: + tagVal = ', '.join(self.typeOptions('x_robots_tag_header')) + response.setHeader('X-Robots-Tag', tagVal) self.recordAccess('show', target=self.uniqueId) if ct.startswith('image/'): #response.setHeader('Cache-Control', 'public,max-age=86400')