跨域REST / Jersey Web服务与CORS [英] Cross domain REST/Jersey web services with CORS
问题描述
我想使用CORS(跨源资源共享)来创建跨域REST Web服务。
我需要知道
-
从服务器端角度来看,需要做哪些代码/配置更改?
-
如何从HTML5 / js调用此服务
/ li>
感谢
您可以在 enable-cors.org 找到您的服务器端配置的信息。
没有必要更改任何代码客户端,但我建议在使用之前检查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
What code/configuration changes i need to do from server side perspective?
How to invoke this services from HTML5/js.
Thanks
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.
这篇关于跨域REST / Jersey Web服务与CORS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!