Bug 34369: Pass csrf token from syspref API client (for Vue app)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
c6ef2aba6b
commit
3c6dd02acb
|
|
@ -16,7 +16,11 @@ export class SysprefAPIClient extends HttpClient {
|
|||
update: (variable, value) =>
|
||||
this.post({
|
||||
endpoint: "",
|
||||
body: "pref_%s=%s".format(variable, value),
|
||||
body: "pref_%s=%s&csrf_token=%s".format(
|
||||
variable,
|
||||
value,
|
||||
csrf_token
|
||||
),
|
||||
headers: {
|
||||
"Content-Type":
|
||||
"application/x-www-form-urlencoded;charset=utf-8",
|
||||
|
|
|
|||
Loading…
Reference in New Issue