I am trying to port this CORS filter to JAX-RS 2.
However, I do not see how to get the Response object (as in the old code) from the ContainerResponseContext I get passed in the overridden method of ContainerResponseFilter.
If there is a more elegant way to do CORS with JAX-RS 2, that would be preferrable of course. Thanks in advance.