Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_transport_security
modules.mcp.native_server._transport_security
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| build_mcp_server | native_server.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| native_server | native_server.py | same file |
modules.mcp.native_server._transport_securitybackend/app/modules/mcp/native_server.py, lines 64–76Open source
def _transport_security() -> TransportSecuritySettings: """DNS-rebinding protection on, with the deployment's own hostnames allowed. The SDK default allows only localhost, which makes every request to a deployed server (Host: pharos.example.com) fail with HTTP 421. """ settings = get_settings() hosts = _LOCAL_HOSTS + list(settings.MCP_ALLOWED_HOSTS) origins = [f"http://{h}" for h in _LOCAL_HOSTS] + list(settings.ALLOWED_ORIGINS) origins += [f"https://{h}" for h in settings.MCP_ALLOWED_HOSTS] return TransportSecuritySettings( enable_dns_rebinding_protection=True, allowed_hosts=hosts, allowed_origins=origins )What the index recorded
- Signature
def _transport_security() -> TransportSecuritySettings:- File
backend/app/modules/mcp/native_server.py- Lines
- 64–76
- Parser
- python-ast
- Git blob
0927865cd82a674fcaaa8c119faa660d8e20a47f- Call sites
- 3 named, 1 resolved, 2 left unlinked
- Outside this subset
- 1 more edges reach code outside the graph shown here
