How can access and the origin policy in chrome as I'm not using a server

前端 未结 1 578
南笙
南笙 2021-01-25 15:21

I want to change the origin policy in chrome, how can I access it and modify it?

Many thanks

相关标签:
1条回答
  • 2021-01-25 15:58

    Are you talking about relaxing the same origin policy for file:/// urls? If so, I strongly recommend you set up a web server on your local machine and develop that way.

    That said, you can run Chrome with this command line flag: --allow-file-access-from-files This will make all file:/// urls run in the same origin. The downside: any .html page you download and open could possibly open any file on your system and upload it to some server without you knowing. So you need to be more careful if you're doing this.

    Besides file:/// urls you cannot change the same origin policy outside of APIs like CORS.

    0 讨论(0)
提交回复
热议问题