Cross domain access to submit questions

IE can normal visit, Firefox, Google can not visit, not receiving data.
In order to cross domain access, I added the head tags in the request as follows:
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
response.addHeader("Access-Control-Allow-Headers", "Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With");
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
Now, the browser can access, but will submit again, two submission header information as follows:
OPTIONS /medicine/ProductAction_queryProductsByPage.action?_dc=1372124743627&pageNo=1&start=0&limit=6 HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Access-Control-Request-Method: GET
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36
Access-Control-Request-Headers: origin, x-requested-with
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
////////////////////////////////////////////////////////////////////
GET /medicine/ProductAction_queryProductsByPage.action?_dc=1372124743627&pageNo=1&start=0&limit=6 HTTP/1.1
Host: localhost:8080
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36
Origin: null
X-Requested-With: XMLHttpRequest
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Add, I use the Ajax asynchronous submission, Extjs framework

Started by Hubery at November 09, 2016 - 12:25 PM

You should put your code and not request the header information

No code we see no problem ah

Posted by Ella at November 14, 2016 - 1:02 PM

Cross domain with access to JSON Ajax

Posted by Perry at November 18, 2016 - 1:59 PM

Cause the cross domain problem, the first options request for cross domain is allowed

Posted by Tom at November 27, 2016 - 2:30 PM