INNER CODE UNIT · Python

_code_mode_lifespan

RekklesNA/ProxmoxMCP-Plus · src/proxmox_mcp/server.py:249

    async def _code_mode_lifespan(self) -> AsyncIterator[None]:
        if self.code_mode is not None and self.config.mcp.code_mode_pool_reuse:
            async with self.code_mode.pool_lifespan():
                yield
        else:
            yield

    def _build_transport_security(self) -> Any | None:
        mcp_config = self.config.mcp
        configured = (
            mcp_config.dns_rebinding_protection is not None
            or bool(mcp_config.allowed_hosts)
            or bool(mcp_config.allowed_origins)
        )
        if not configured:
            return None
        if TransportSecuritySettings is None:
            raise RuntimeError(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…