| 245 | return referer |
| 246 | |
| 247 | def isScriptNonceSupported(self): |
| 248 | user_agent = self.env.get("HTTP_USER_AGENT") |
| 249 | if "Edge/" in user_agent: |
| 250 | is_script_nonce_supported = False |
| 251 | elif "Safari/" in user_agent and "Chrome/" not in user_agent: |
| 252 | is_script_nonce_supported = False |
| 253 | else: |
| 254 | is_script_nonce_supported = True |
| 255 | return is_script_nonce_supported |
| 256 | |
| 257 | # Send response headers |
| 258 | def sendHeader(self, status=200, content_type="text/html", noscript=False, allow_ajax=False, script_nonce=None, extra_headers=[]): |