users@jax-rs-spec.java.net

[jax-rs-spec users] Re: JAX-RS 2.1 and CORS

From: Reza Rahman <Reza.Rahman_at_oracle.com>
Date: Wed, 10 Sep 2014 10:33:34 -0400

+1. It seems a common enough scenario that folks get tripped up on.

On 8/27/2014 2:31 PM, mwessendorf_at_gmail.com wrote:
> hello,
>
> just read Arun's blog on JAvaEE8 and was wondering if there are plans
> to add support for CORS to JAX-RS 2.1
>
> Currently, when CORS is needed one has to use impl specific code, such
> as:
>
> *
> http://docs.jboss.org/resteasy/docs/3.0.7.Final/userguide/html_single/i
> ndex.html#d4e1290
>
> * http://cxf.apache.org/docs/jax-rs-cors.html
>
> or some custom impl, or "frameworks":
>
> *
> http://www.developerscrappad.com/1781/java/java-ee/rest-jax-rs/java-ee-
> 7-jax-rs-2-0-cors-on-rest-how-to-make-rest-apis-accessible-from-a-diffe
> rent-domain/
>
> *
> https://code.google.com/r/sergiobossa-terrastore-kryo/source/browse/src
> /main/java/terrastore/server/impl/cors/CorsInterceptor.java
>
>
> I think JAX-RS should be having something like this, out of the box
>
> Thanks,
> Matthias