Origin http://127.0.0.1:8888 is not allowed by Access-Control-Allow-Origin – GWT Debugging

During GWT debugging, if you are making a RequestBuilder on a different domain without using JSONP, you may have this problem.
To fix it you must configure Header in order to accept requests from other domains. In Apache HTTP Server you can set them in the VirtualHost configuration of bar.com using the directive Header set.

 
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "X-Requested-With"

Or better filtering by your origin – see also https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Allow-Origin


Header set Access-Control-Allow-Origin "http://foo.com"
Header set Access-Control-Allow-Headers "X-Requested-With"

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s