Google Chrome: Disable Same-Origin Policy in local files only?

妖精的绣舞 提交于 2019-12-11 04:29:51

问题


It is a good security standard, I'd say, it stops websites from loading shady stuff from other websites on your browser. However, when developing, it's complete hell for any application that uses AJAX (that includes LESS, W3Data and Web Components polyfill, to name a few), since the browser thinks I'm calling from outside (since there's no server).

I know that you can disable browser security, but that has two problems: first, if I'm correct, it disables any kind of security Chrome offers and second, it works globally, both in the web and local. Isn't it possible to just tell Chrome that it's safe if it involves only local HTMLs (maybe making it activate CORS within local files)?

来源:https://stackoverflow.com/questions/42863722/google-chrome-disable-same-origin-policy-in-local-files-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!