equal
deleted
inserted
replaced
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)) |
370 wsgireq.headers.append(('Content-Security-Policy', csp)) |
371 |
371 |
372 virtual = wsgireq.env.get("PATH_INFO", "").strip('/') |
372 virtual = req.dispatchpath.strip('/') |
373 tmpl = self.templater(wsgireq, nonce) |
373 tmpl = self.templater(wsgireq, nonce) |
374 ctype = tmpl('mimetype', encoding=encoding.encoding) |
374 ctype = tmpl('mimetype', encoding=encoding.encoding) |
375 ctype = templater.stringify(ctype) |
375 ctype = templater.stringify(ctype) |
376 |
376 |
377 # Global defaults. These can be overridden by any handler. |
377 # Global defaults. These can be overridden by any handler. |