4
我的服務器被設置爲處理CORS頭。這是默認情況下,服務器期望來自客戶端請求的'Origin
'標題。 但是,當我嘗試與谷歌瀏覽器客戶端沒有設置'Origin
頭,我得到的迴應。 這是如何工作的?Chrome REST客戶端如何在未設置CORS標頭的情況下工作?
我的請求標題;
GET /delete/1.0 HTTP/1.1
Authorization: Bearer 98b42f3eee1db4bc1dc8fca8e557f13
Content-Type: application/x-www-form-urlencoded
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 127.0.0.1:5555
我的迴應標題;
HTTP/1.1 200 OK
Access-Control-Allow-Headers: authorization,Access-Control-Allow-Origin,Content-Type
Host: 127.0.0.1:5555
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Fri, 03 Oct 2014 06:45:13 GMT
Server: WSO2-PassThrough-HTTP
Transfer-Encoding: chunked
尋找相同的答案... – vs4vijay 2015-06-22 12:03:11