Implement CSP and error logging.