raw-http-protocol.js
1 import fetchToHandler from './fetch-to-handler.js' 2 3 export default async function createHandler () { 4 return fetchToHandler(async () => { 5 return async function rawFetch (url, options = {}) { 6 const finalURL = url.replace('https+raw:', 'https:') 7 const response = await fetch(finalURL, { 8 ...options, 9 redirect: 'follow', 10 credentials: 'omit', 11 cache: 'no-store', 12 referrerPolicy: 'no-referrer' 13 }) 14 15 return response 16 } 17 }) 18 }