I have used the example in the SO question here to configure a CORS filter (Camel JAX-RS and Cross Domain Request).
However, as mentioned in the comments, this is not an ideal solution for production, and neither is placing an origin with a defined set of URLs appropriate for DEV and Testing. What is needed, is a configurable setup which allows for a more loose option in dev, but strict in Testing and Production. Can someone please show me how this can be configured for CXFRS please? Thank you.
Regards, Emeka K
Never mind. I found an answer.
To make this more configurable, you cannot use the annotations based approach of the CrossOriginResourceSharing class provided. You can only use the filter.
My approach was to wrap the filter class in a Factory implementation which built the filter in a factory method. This can be referenced in Spring or Blueprint as normal then.