Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling same-origin policy in Safari

For development purposes, I need to disable the same-origin policy in Safari (on Windows) on my machine.

In Chrome, this can be done by launching with the flag --disable-web-security. Is there an equivalent flag or hidden setting in Safari?

like image 802
kpozin Avatar asked Dec 29 '10 17:12

kpozin


People also ask

How do I open Safari without Cors?

Safari: The easiest and most reliable way to CORS in Safari is to disable CORS in the develop menu. Enable the develop menu by going to Preferences > Advanced. Then select “Disable Cross-Origin Restrictions” from the develop menu.

How do I turn off origin policy?

In Google Chrome, you can easily disable the same-origin policy of Chrome by running Chrome with the following command: [your-path-to-chrome-installation-dir]\chrome.exe --disable-web-security --user-data-dir . Make sure that all instances of Chrome are closed before you run the command.

Why does browser have the same-origin policy?

The same-origin policy is an important security feature of any modern browser. Its purpose is to restrict cross-origin interactions between documents, scripts, or media files from one origin to a web page with a different origin. The HTTP protocol was extremely simple when it was first created.

Is same-origin policy enabled by default?

Hence the name same-origin policy. The same-origin policy is active by default and most browsers provide good error messages when actions cannot be executed because of same-origin policy issues. For instance, the following script defines an illegal cross-origin HTTP request.


1 Answers

If you want to disable the same-origin policy on Safari (I have 9.1.1), then you only need to enable the developer menu, and select "Disable Cross-Origin Restrictions" from the develop menu.

like image 159
ttemple Avatar answered Oct 02 '22 16:10

ttemple