feat: set x-csrf-token header for requests
This commit is contained in:
parent
4a7956782b
commit
b64dbb289d
@ -26,7 +26,10 @@ export default (opts = {}) => {
|
||||
link: new HttpLink({
|
||||
uri: URI,
|
||||
credentials: 'same-origin',
|
||||
fetch
|
||||
fetch,
|
||||
headers: {
|
||||
'X-CSRF-Token': document.cookie.replace(/(?:(?:^|.*;\s*)crumb\s*=\s*([^;]*).*$)|^.*$/, '$1')
|
||||
}
|
||||
}),
|
||||
...opts
|
||||
});
|
||||
|
@ -26,7 +26,10 @@ export default (opts = {}) => {
|
||||
link: new HttpLink({
|
||||
uri: URI,
|
||||
credentials: 'same-origin',
|
||||
fetch
|
||||
fetch,
|
||||
headers: {
|
||||
'X-CSRF-Token': document.cookie.replace(/(?:(?:^|.*;\s*)crumb\s*=\s*([^;]*).*$)|^.*$/, '$1')
|
||||
}
|
||||
}),
|
||||
...opts
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user