treviettreviet / chrome-rest-client

Automatically exported from code.google.com/p/chrome-rest-client
0 stars 0 forks source link

Cross site scripting related error when trying to run via developer mode #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When running RestClientApp via hosted mode, I run into an error whenever I try 
to send a request using chrome: 

XMLHttpRequest cannot load http://localhost:8080/api/rest/catalog/. Origin 
http://127.0.0.1:8888 is not allowed by Access-Control-Allow-Origin.

I was wondering how/if you do debugging via developer mode.  The googling I did 
on this was inconclusive... 

Thanks!
Mike

Original issue reported on code.google.com by mikew...@gmail.com on 2 Apr 2012 at 9:37

GoogleCodeExporter commented 9 years ago
Actually there are 2 ways to walk around this issue :)
1) Change "http://localhost:8080/api/rest/catalog/" to 
"http://127.0.0.1:8080/api/rest/catalog/"
2) if http://localhost:8080/api/rest/catalog/ is a servlet set header: 
Access-Control-Allow-Origin: * in response to request.

Original comment by jarro...@gmail.com on 4 Apr 2012 at 6:53