MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / stripHeaders

Function stripHeaders

packages/yalt/src/index.ts:241–254  ·  view source on GitHub ↗
(headers: Record<string, string>)

Source from the content-addressed store, hash-verified

239
240// Remove headers that should not be included like connection, host, etc
241function stripHeaders(headers: Record<string, string>) {
242 const blacklistHeaders = [
243 "connection",
244 "cf-ray",
245 "cf-connecting-ip",
246 "host",
247 "cf-ipcountry",
248 "content-length",
249 ];
250
251 return Object.fromEntries(
252 Object.entries(headers).filter(([key]) => !blacklistHeaders.includes(key.toLowerCase()))
253 );
254}
255
256function fetch(url: RequestInfo, init?: RequestInit) {
257 const fetchInit: RequestInit = { ...init };

Callers 2

createRequestMessageFunction · 0.85
handleRequestMethod · 0.85

Calls 1

filterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…