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

Method isSameOrigin

src/Ui/UiRequest.py:536–541  ·  view source on GitHub ↗
(self, url_a, url_b)

Source from the content-addressed store, hash-verified

534 return add_nonce
535
536 def isSameOrigin(self, url_a, url_b):
537 if not url_a or not url_b:
538 return False
539 origin_a = re.sub("http[s]{0,1}://(.*?/.*?/).*", "\\1", url_a)
540 origin_b = re.sub("http[s]{0,1}://(.*?/.*?/).*", "\\1", url_b)
541 return origin_a == origin_b
542
543 # Return {address: 1Site.., inner_path: /data/users.json} from url path
544 def parsePath(self, path):

Callers 1

sendHeaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected