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

Reply via email to