diff --git a/changelog/unreleased/bugfix-x-requested-with-header b/changelog/unreleased/bugfix-x-requested-with-header new file mode 100644 index 000000000..9cce6330b --- /dev/null +++ b/changelog/unreleased/bugfix-x-requested-with-header @@ -0,0 +1,5 @@ +Bugfix: Always add X-Requested-With header + +We've added the `X-Requested-With` header to all requests as oC 10 is using this to determine whether it should treat certain requests as ajax requests or not (for example: ajax requests should never show an auth popup). + +https://github.com/owncloud/owncloud-sdk/pull/1020 diff --git a/src/helperFunctions.js b/src/helperFunctions.js index 2c2730866..d81eb4095 100644 --- a/src/helperFunctions.js +++ b/src/helperFunctions.js @@ -196,6 +196,7 @@ class helpers { headers.Authorization = this._authHeader } headers['X-Request-ID'] = uuidv4() + headers['X-Requested-With'] = 'XMLHttpRequest' return headers }