Skip to main content
Glama
gilberth

MCP Cloudflare DNS Server

h2-over-h2.js853 B
'use strict'; const {globalAgent} = require('../agent.js'); const Http2OverHttpX = require('./h2-over-hx.js'); const getAuthorizationHeaders = require('./get-auth-headers.js'); const getStatusCode = stream => new Promise((resolve, reject) => { stream.once('error', reject); stream.once('response', headers => { stream.off('error', reject); resolve(headers[':status']); }); }); class Http2OverHttp2 extends Http2OverHttpX { async _getProxyStream(authority) { const {proxyOptions} = this; const headers = { ...getAuthorizationHeaders(this), ...proxyOptions.headers, ':method': 'CONNECT', ':authority': authority }; const stream = await globalAgent.request(proxyOptions.url, proxyOptions, headers); const statusCode = await getStatusCode(stream); return [stream, statusCode, '']; } } module.exports = Http2OverHttp2;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gilberth/mcp-cloudflare'

If you have feedback or need assistance with the MCP directory API, please join our Discord server