Hi Brian,
you actually can modify response headers - see ContainerResponseFilter
http://jersey.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/spi/container/ContainerResponseFilter.html.
We don't have any support for CORS afaik, feel free to create RFE -
java.net/jira/browse/JERSEY
Regards,
Pavel
On 11/15/11 10:50 PM, Brian Repko wrote:
> Jersey folks:
> We have a number of Jersey-implemented services (currently on 1.8)
> We use custom WADL generators to add meta-data about the service to
> the <doc> tags in the WADL.
> We now have a UI that is using AJAX to get the WADLs and parse them
> for that meta-data (environment, version, build-date, etc.).
> However, the WADL generation doesn't support CORS and I can't see
> anyway to configure it in there.
> I can see where RootResourceUriRules (initWadlResource method) will
> add the WadlResource to the WebApplicationImpl.
> But that is a hard-coded class (so I can't wrap it or subclass it).
> And WadlResource has no hooks into it modify the Response before being
> returned.
> I need to add the CORS headers (and potentially read the Origin
> header) - any clues on how to configure that?
> Does this fit in with the upcoming work to redesign how OPTIONS works
> in order to do CORS - better ways to call into / extend the magic
> behavior?
> Thanks,
> Brian
> ---
> Brian Repko
> LearnThinkCode, Inc. <http://www.learnthinkcode.com>
> email: brian.repko_at_learnthinkcode.com
> <mailto:brian.repko_at_learnthinkcode.com>
> phone: +1 612 229 6779