XMLHttpRequest Origin null is not allowed Access-Control-Allow-Origin for file:/// to file:/// (Serverless)

前端 未结 9 899
醉梦人生
醉梦人生 2020-11-22 03:30

I\'m trying to create a website that can be downloaded and run locally by launching its index file.

All the files are local, no resources are used online.

Wh

9条回答
  •  一整个雨季
    2020-11-22 04:08

    Launch chrome like so to bypass this restriction: open -a "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --args --allow-file-access-from-files.

    Derived from Josh Lee's comment but I needed to specify the full path to Google Chrome so as to avoid having Google Chrome opening from my Windows partition (in Parallels).

提交回复
热议问题