MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / isScriptNonceSupported

Method isScriptNonceSupported

src/Ui/UiRequest.py:247–255  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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=[]):

Callers 1

sendHeaderMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected