Take the 2-minute tour ×

Is it possible to disable cross domain security checks in Chromium while running dart application in Dart VM ?

The problem is that it is running on its own port, and thus my application can't send asynchronous requests to my backend which is running on another port.

Yes, I know that I can copy dart file to my backend and it will run just fine, but then I can't debug it.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

If you're after a stop gap solution, just for debugging, you can use a flag to turn it off in chrome.

[chromium executable] --disable-web-security

This is taken from this post Chrome: Disable same origin policy.

Otherwise, the addition header in the response is the right way to go. Of course, you can swap the asterisk for a list of IP addresses if you want to improve security.

See https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS for more details.

share|improve this answer
add comment

Adding Access-Control-Allow-Origin: * to response headers on backend should be enough to make cross domain asynchronous requests.

share|improve this answer
add comment

Your Answer


