问题
I want to block a request if contains in header "addHeader". How can I do this?. I already search on Google and find doFilter method but I don't understand how I using this. There is no explanatory examples for me. In jsp file I have already write this code block;
String example = request.getHeader("Content-Type") + " This is from req. header";
System.out.println(example);
if(example.contains("addHeader")){
System.out.println("Contains AddHeader!!");
Block Req.
}
Thanks for helping :)
来源:https://stackoverflow.com/questions/57552843/how-to-block-request-if-context-type-contains-addheader