To help decide which approach is best for our users this gist will show how configuring CORS in AeroGear Controller would be like using CDI and via web.xml
For a CDI version and the specific case of CORS users will probably need to provide their own configuration settings. The proposed solution for this is for a user to provide a CDI Producer, for example:
public class CorsConfigProducer {
public @Produces CorsConfiguration getConfiguration() {
return CorsConfig.create()
.enableCorsSupport(true)