Adjusted access-control-allow-headers

This commit is contained in:
Claudio Maggioni 2020-03-03 12:10:39 +01:00
parent e43a913ff3
commit 2dff446c23

View file

@ -20,7 +20,9 @@ public class CORSFilter implements Filter {
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Methods", "HEAD, PUT, POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with");
response.setHeader(
"Access-Control-Allow-Headers",
"Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers");
chain.doFilter(req, res);
}