cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: [proposal] Cross-Origin JAX-RS annotations
Date Thu, 01 Dec 2011 15:34:21 GMT
On 01/12/11 14:51, Benson Margulies wrote:
> I propose to add the following
>
> @CorsAllowAllOrigins
> @CorsAllowOrigins(  "origin1.", ... "originN" )
> @CorsAllowMethods( "meth1" ... "methn" )
> @CorsExposeMethods( ... )
> @CorsMaxAge(integer)
> @CorsAllowCredentials(boolean)
>
> and make the filter look for them on resources and classes in the usual way.
>
> Any objections?

Can we collapse it all into a single annotation but with many properties ?
@Cors(origins = "...",
       methods = "a b c"
       allowCredentials = true
       )

I'd prefer if possible to avoid the explosion of annotations.

Re @CorsAllowMethods( "meth1" ... "methn" ) (or methods = "a b") - is it 
HTTP methods ?
Then how it work on a method annotated with say @POST ? May be it should 
be a single method value only ?
Re CorsAllowOrigins, is it relative URIs ? We'd probably need to think 
of introducing properties such as absolute.uri, etc, to be reused by 
other annotation such as SchemaLocation & XMLInstruction

Thanks, Sergey

Mime
View raw message