Skip to content

Commit 8881b96

Browse files
committed
Set the X-Requested-With header on dav requests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent e0c5405 commit 8881b96

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/services/DavClient.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ import webdav from 'webdav'
2424
import axios from '@nextcloud/axios'
2525
import { getRootPath, getToken, isPublic } from '../utils/davUtils'
2626

27+
// Add this so the server knows it is an request from the browserg
28+
axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest'
29+
2730
// force our axios
2831
const patcher = webdav.getPatcher()
2932
patcher.patch('request', axios)

0 commit comments

Comments
 (0)