I have an application, when I clicked login button, I got an 403 error, and it only happens in Chrome, works fine in all of the other browsers.
Here is the log I found from the tomcat log file (localhost_access_log.2015-03-11.txt):
0:0:0:0:0:0:0:1 - - [11/Mar/2015:20:27:42 -0700] "POST /app/login/do_login HTTP/1.1" 403 -
0:0:0:0:0:0:0:1 - - [11/Mar/2015:20:28:25 -0700] "POST /app/login/do_login HTTP/1.1" 403 -
PS: Our backend is written in java, we are using spring security for authentication, tomcat 7.0.57 is the version we are using.
Any idea?
After two days' research, I found that that's because I have CorsFilter configured in my tomcat, and Chrome will add an "origin" element in the form submit request if the request type is "POST" by default, even the request has the same host.