pmt02 / edukapp

Automatically exported from code.google.com/p/edukapp
Apache License 2.0
0 stars 0 forks source link

Ajax calls to REST api suffer from cross domain security issue #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a common issue with REST calls from javascript.

The solution is to add the Access-Control-Allow-Origin  *  header to each 
response.

For a servlet this can be done with a filter.

I'll have a go at this.

Original issue reported on code.google.com by KJPo...@gmail.com on 21 May 2012 at 2:47

GoogleCodeExporter commented 9 years ago
Added a filter called CorsFilter and made small changes to web.xml.

Please review and make sure the changes I have made break nothing else.

Original comment by KJPo...@gmail.com on 23 May 2012 at 8:44

GoogleCodeExporter commented 9 years ago
The change for this is done now.

Original comment by KJPo...@gmail.com on 23 May 2012 at 10:13