mercurial/hgweb/hgwebdir_mod.py
changeset 36908 cd6ae9ab7bd8
parent 36907 c1de7efca574
child 36911 f0a851542a05
equal deleted inserted replaced
36907:c1de7efca574 36908:cd6ae9ab7bd8
   365             self.refresh()
   365             self.refresh()
   366 
   366 
   367             csp, nonce = cspvalues(self.ui)
   367             csp, nonce = cspvalues(self.ui)
   368             if csp:
   368             if csp:
   369                 res.headers['Content-Security-Policy'] = csp
   369                 res.headers['Content-Security-Policy'] = csp
   370                 wsgireq.headers.append(('Content-Security-Policy', csp))
       
   371 
   370 
   372             virtual = req.dispatchpath.strip('/')
   371             virtual = req.dispatchpath.strip('/')
   373             tmpl = self.templater(req, nonce)
   372             tmpl = self.templater(req, nonce)
   374             ctype = tmpl('mimetype', encoding=encoding.encoding)
   373             ctype = tmpl('mimetype', encoding=encoding.encoding)
   375             ctype = templater.stringify(ctype)
   374             ctype = templater.stringify(ctype)