You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
import javax.servlet.*;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
public class OptionsVerifyTwoRule implements Filter {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void init(FilterConfig filterConfig) throws ServletException {}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
|
|
|
throws IOException, ServletException {
|
|
|
|
HttpServletResponse res = (HttpServletResponse) response;
|
|
|
|
res.addHeader("X-Frame-Options", "iframe");
|
|
|
|
chain.doFilter(request, response);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void destroy() {}
|
|
|
|
}
|