0
我試過this,但無法使其正常工作。我做了一個jQuery ajax請求,登錄到Drupal系統,其中xhrFields
withCredentials
設置爲true。服務器返回會話名稱和ID。所以我想我的問題是;我如何將這些withCredentials
設置爲request
,因爲它是通過ajax調用完成的?Node.js - 如何在http請求中設置cookie
var cookie = request.cookie(app.session.sessionName + '=' + app.session.sessionId);
progress(request(url), {
header: {
'Cookie': cookie
}
})
// Access denied [Anonymous user]