code: def create_header(self):
  		
  		encapsulate =  re.compile("|".join(['^self','^none','^unsafe-inline','^unsafe-eval','^sha[\d]+-[\w=-]+','^nonce-[\w=-]+']))
  		csp = {}
  		for p,array in self.inputs.items():
  			csp[p] = ' '.join(["'%s'" % l if encapsulate.match(l) else l for l in array])
  
  		return {self.header:'; '.join(['%s %s' % (k, v) for k, v in csp.items() if v != ''])}
docs: return CSP header dict