Ajax.Request(からPrototype.js)に設定xhr.transport.withCredentialsするように指示する必要があります(trueクロスサイトリクエストヘッダーでCookieを有効にするため)。私は試して失敗しました:
Ajax.Request('http://otherSubdomain.host:port/', {
onCreate: function(request){
request.transport.withCredentials = true;
}
});
Access-Control-Allow-Originが設定され、request成功しましたが、Cookieは送信されませんでした。
指摘するのは嫌ですjquery
が、ここでははるかに簡単なようexample solutionです。