X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Futils%2Fajax.js;h=1d181fa2a2837105571460480779b4ef592a7a87;hp=0a50a10409ac1c332b84e141f61a110846b72c0f;hb=deca03e8aeb7cac9c19b0d43b4642b27299695b5;hpb=a7f9f050e44080e8caf888e3b230660abffa2400 diff --git a/client/src/utils/ajax.js b/client/src/utils/ajax.js index 0a50a104..1d181fa2 100644 --- a/client/src/utils/ajax.js +++ b/client/src/utils/ajax.js @@ -47,9 +47,8 @@ export function ajax(url, method, data, success, error) } xhr.open(method, params.serverUrl + url, true); xhr.setRequestHeader('X-Requested-With', "XMLHttpRequest"); - // Next line because logout and authenticate set (cross-domain in dev mode) cookies - if (url.startsWith("/authenticate") || url.startsWith("/logout")) - xhr.withCredentials = true; + // Next line to allow cross-domain cookies in dev mode (TODO: if...) + xhr.withCredentials = true; if (["POST","PUT"].includes(method)) { xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");