Enable Fetch Local File
If you open local file e.g. index.html, the browser will use file:// protocol i.e. file:///C:/Projects/index.html However any fetch request will fail due to CORS policy to allow http or https only.
To enable file: protocol to be fetched
- in Firefox, open
about:config
and setprivacy.file_unique_origin
tofalse
- in Chrome, start with
--disable-we-security
- or in Chrome install Web Server for Chrome extension which server local files via http protocol to chrome or other browsers.
Written on June 11, 2020