Hi, See http://cxf.apache.org/docs/jax-rs-cors.html
You can have a preflight request supported directly in the code with @LocalPreflight or configure the JAX-RS filter to do it.
I know many people use servlet filters to do a 'quick' CORS support done as well, but you can get much more control with the CXF-level filter
Cheers, Sergey On 03/06/14 03:02, snake0zero wrote:
Thx for your reply, in your comments[need to implement the OPTIONS in your rest service.] Does it means add @OPTIONS annotation over my rest service method or add OPTIONS in Access-Control-Allow-Methods by server? I have tried two above method, but when i access cross-site, it still prompt [No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8181' is therefore not allowed access.] How should i solve this issue? -- View this message in context: http://cxf.547215.n5.nabble.com/About-cxf-CORS-with-setRequestHeader-or-without-setRequestHeader-tp5744552p5744623.html Sent from the cxf-user mailing list archive at Nabble.com.
