1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-20 10:20:42 +00:00

Merge pull request #2317 from haiwen/6.3-csrf_cookie

Use custom csrf cookie name to avoid name conflict
This commit is contained in:
zheng xie
2018-08-30 18:52:24 +08:00
committed by GitHub
9 changed files with 24 additions and 6 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));
}
},