Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross domain REST/Jersey web services with CORS

I want to make Cross domain REST web services with CORS(Cross-Origin Resource Sharing). I am using Jersey Libraries for making services.

I need to know

  1. What code/configuration changes i need to do from server side perspective?

  2. How to invoke this services from HTML5/js.

Thanks

like image 917
shashankaholic Avatar asked Dec 09 '22 01:12

shashankaholic


1 Answers

All the information for your server side configuration can be found at enable-cors.org.

There is no need to change any code clientside, but I would recommend checking the Browsers capability for CORS before using it. Testing code can be found, e.g., here.

like image 84
Sirko Avatar answered Dec 28 '22 06:12

Sirko