I want to make a general filter - for all requests and responses.
Check for Origin and the presence of certain headers in requests.
Apply a filter for all URLs:
@WebFilter("/*") public class MyFilter implements Filter {}Found this method for creating a filter for all URLs of a web application. The mechanism of operation of such a method remained under question ..
What exactly will happen?
Any request that will come from my domain, will first go through this class with its checking for the presence of headers, and after a successful check, leave by its URI?
Also I will be glad to any advice on creating a good filter for requests and answers, which will add to security!