0

I'm running a felix container with HttpService implemented by Jetty.

Jetty supports CORS using the Cross-Origin-Filter and it's usually configured in web.xml as seen e.g. here

Unfortunately, the Felix HTTPService doesn't expose anything of the sort as far as I can tell, so the question is: how do I get that configuration to my "felix wrapped" Jetty?

Thanks!

Community
  • 1
  • 1
Miquel
  • 15,405
  • 8
  • 54
  • 87

1 Answers1

0

I haven't figured out how to break through the Felix barrier to programmatically configure Cross-Origin-Filters, but a possible workaround, if very simple filters are needed, is to manually add the required fields, as in:

resp.addHeader("Access-Control-Allow-Origin", "*");
Miquel
  • 15,405
  • 8
  • 54
  • 87