Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crossdomain settings in Google Chrome

I'm wondering, in IE & Firefox you're able to setup the browser, to allow cross-domain calls.

I can't find any option in chrome for that (actually, there are in general not too much options at all...)

are there any about:config like things?

Kind Regards

--Andy

like image 881
jAndy Avatar asked Apr 08 '10 14:04

jAndy


People also ask

How do I enable CORS in chrome?

Allow CORS: Access-Control-Allow-Origin. Easily add (Access-Control-Allow-Origin: *) rule to the response header. Allow CORS: Access-Control-Allow-Origin lets you easily perform cross-domain Ajax requests in web applications. Simply activate the add-on and perform the request.

How do I turn off cross-origin in chrome?

I find the best way to do this is duplicate a Chrome or Chrome Canary shortcut on your windows desktop. Rename this shortcut to "NO CORS" then edit the properties of that shortcut. in the target add --disable-web-security --user-data-dir="D:/Chrome" to the end of the target path.

How do I enable CORS browser?

To enable cross-origin access go to Tools->Internet Options->Security tab, click on “Custom Level” button. Find the Miscellaneous -> Access data sources across domains setting and select “Enable” option.

How do you turn off strict origin when cross-origin?

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.


3 Answers

This answer was correct when written, but is longer correct, the switch has been deprecated

Chrome has a command line switch for this:

chrome.exe --disable-web-security

You can view a full list (as of when it was posted!) of command line options for chrome here.

like image 69
Ashish Agarwal Avatar answered Oct 21 '22 13:10

Ashish Agarwal


No. Sorry.

Chrome and Firefox, however do support cross-domain requests via the W3C CORS spec (Cross Origin resource sharing) however the remote host has to enable it. If the remote host supports it explicitly then you don't have to make any changes to your XMLHttpRequest to be able to fetch the content.

like image 27
Kinlan Avatar answered Oct 21 '22 13:10

Kinlan


You can install chrome plugins which enable cross-origin resource sharing .

I use this .

like image 35
jiahut Avatar answered Oct 21 '22 14:10

jiahut