MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _normalize_runtime_method

Function _normalize_runtime_method

src/api/admin.py:163–167  ·  view source on GitHub ↗
(method: Optional[str])

Source from the content-addressed store, hash-verified

161 headers: Dict[str, str] = {}
162 major_match = re.search(r"(?:Chrome|Chromium|Edg|EdgA|EdgiOS)/(\d+)", ua)
163 is_mobile = any(token in ua for token in ("Android", "iPhone", "iPad", "Mobile"))
164 headers["sec-ch-ua-mobile"] = "?1" if is_mobile else "?0"
165
166 if "Windows" in ua:
167 headers["sec-ch-ua-platform"] = '"Windows"'
168 elif "Macintosh" in ua or "Mac OS X" in ua:
169 headers["sec-ch-ua-platform"] = '"macOS"'
170 elif "Android" in ua:

Callers 3

_prepare_captcha_runtimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected