Browser as a service, you can quick fetch crosss orgin resources by use edgeFetch(api, options)
Edge === Your browser tab
- download latest release
.crx
- download windows policy file
dist_allowlist.reg
(mac:dist_allowlist.mobileconfig
) - run policy file
- restart chrome(or other moden browser)
- open extensions manage page(chrome is
chrome://extensions
) - enable developer mode
- drag
.crx
file to browser
- open any website and a
github.com
page - open developer tools on any page exclude
github.com
pages - run it
response = await edgeFetch('https://github.com/DistPub/edge-lover')
- Its just success! Say goodbye to CORS error 😀.
the same to window.fetch
, differences are:
options.edgeOrigin
you can manually set who will make net request, default isnew URL(api).origin
- error throw when not found any edge to make request
- the
response.type="basic"
,response.url=""