[JAX-RS] Access-Control-Allow-Origin as a Filter

So if you’re getting the¬†Access-Control-Allow-Origin error in chrome. Then you need to be sending those headers with the response from the server.

One solution would be to put it in the Response in each method.

A better (and more scalable) solution is to use a filter. Then don’t forget to disable it in production.


Leave a Reply

Your email address will not be published. Required fields are marked *