1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00

Use custom csrf cookie name to avoid name conflict

This commit is contained in:
zhengxie
2018-08-30 11:40:45 +08:00
parent 1faa061321
commit 0f59f84804
5 changed files with 7 additions and 4 deletions

View File

@@ -530,7 +530,7 @@ define([
}
if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) {
// Only send the token to relative URLs i.e. locally.
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
xhr.setRequestHeader("X-CSRFToken", getCookie(app.config.csrfCookieName));
}
},