code: def csp_header(csp={}):
      
      _csp = csp_default().read()
      _csp.update(csp)
      
      _header = ''
      if 'report-only' in _csp and _csp['report-only'] is True:
      	_header = 'Content-Security-Policy-Report-Only'
      else:
      	_header = 'Content-Security-Policy'
      if 'report-only' in _csp:
      	del _csp['report-only']
      _headers = {_header: create_csp_header(_csp)}
      
      def decorator(f):
          @wraps(f)
          def decorated_function(*args, **kwargs):
              resp = make_response(f(*args, **kwargs))
              h = resp.headers
              for header, value in _headers.items():
                  h[header] = value
              return resp
          return decorated_function
      return decorator
docs: Decorator to include csp header on app.route wrapper