Skip to content
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
Set the X-Requested-With header on dav requests
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
  • Loading branch information
skjnldsv authored and npmbuildbot[bot] committed Aug 31, 2020
commit c17c013d94183835681f652e4432e6d1717e32a4
34 changes: 28 additions & 6 deletions js/viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/services/DavClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import webdav from 'webdav'
import axios from '@nextcloud/axios'
import { getRootPath, getToken, isPublic } from '../utils/davUtils'

// Add this so the server knows it is an request from the browserg
axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest'

// force our axios
const patcher = webdav.getPatcher()
patcher.patch('request', axios)
Expand Down