Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Add X-Requested-With header to all requests #1020

Merged
merged 1 commit into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/bugfix-x-requested-with-header
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions src/helperFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class helpers {
headers.Authorization = this._authHeader
}
headers['X-Request-ID'] = uuidv4()
headers['X-Requested-With'] = 'XMLHttpRequest'
return headers
}

Expand Down