(h)
| 38 | } |
| 39 | |
| 40 | function sanitizeHeaders(h) { |
| 41 | const out = {}; |
| 42 | if (!h || typeof h !== "object") return out; |
| 43 | for (const [k, v] of Object.entries(h)) { |
| 44 | if (!k) continue; |
| 45 | if (STRIP_HEADERS.has(k.toLowerCase())) continue; |
| 46 | out[k] = String(v ?? ""); |
| 47 | } |
| 48 | return out; |
| 49 | } |
| 50 | |
| 51 | export default { |
| 52 | async fetch(req) { |