MCPcopy Index your code
hub / github.com/dataease/SQLBot / origin_match_domain

Function origin_match_domain

backend/common/utils/utils.py:267–276  ·  view source on GitHub ↗
(origin: str, domain: str)

Source from the content-addressed store, hash-verified

265 return referer
266
267def origin_match_domain(origin: str, domain: str) -> bool:
268 if not origin or not domain:
269 return False
270 origin_normalized = origin.rstrip('/')
271
272 for d in re.split(r'[,;]', domain):
273 if d.strip().rstrip('/') == origin_normalized:
274 return True
275
276 return False
277
278def get_domain_list(domain: str) -> list[str]:
279 domains = []

Callers 2

infoFunction · 0.90
getAppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected