Can I disable SOP (Same Origin Policy) on any browser for development?

前端 未结 10 1191
天涯浪人
天涯浪人 2020-11-27 14:54

I want to develop JavaScript on my Windows machine. Do you know a browser where I can turn off Same Origin Policy so I can develop locally? Firefox would be optimal

相关标签:
10条回答
  • 2020-11-27 15:19

    In Chrome (& Chromium) 48 and above you should add the flag --user-data-dir like this:

    chromium-browser --disable-web-security --user-data-dir
    

    And it works.

    0 讨论(0)
  • 2020-11-27 15:20

    i run this command on mac, it works on me when i use google chrome to run my project.

    open -a Google\ Chrome --args --disable-web-security --user-data-dir
    
    0 讨论(0)
  • 2020-11-27 15:21

    Using the Chromium 13.07, you can start it with security disabled:

    /usr/bin/chromium-browser --disable-web-security

    That's on Ubuntu 11, but change the location as your system.

    0 讨论(0)
  • 2020-11-27 15:23

    You can also redirect a local port to the remote server and port via ssh.

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