0

I am new to Cross-origin resource sharing and I want to enable it in a Tomcat 7.0.39 server. Anybody can give me some hint how can this be achieved?

I want to set the header universally for all requests, and to allow all origins (Access-Control-Allow-Origin: *)

Wich file should i add it?

Giancarlo
  • 1
  • 1
  • 1

1 Answers1

1

You can use a servlet filter to set the CORS headers in Tomcat. See a sample filter implementation on my answer to this question

Community
  • 1
  • 1
Federico Raggi
  • 637
  • 4
  • 6