aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/init.js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-08-18 23:45:15 +0200
committerGitHub <noreply@github.com>2023-08-18 23:45:15 +0200
commitaf87086d0dcff972dd746ad03366468ff334264c (patch)
tree0d42f5b26b122286509084ce79e03a1bcc40933b /core/src/init.js
parentf1e448f3c32bed222442e18d5c71f97e2825f0e1 (diff)
parent0904c843194cbeeb839fd7748e2eb0ea9f6cdf5d (diff)
downloadnextcloud-server-af87086d0dcff972dd746ad03366468ff334264c.tar.gz
nextcloud-server-af87086d0dcff972dd746ad03366468ff334264c.zip
Merge pull request #39924 from nextcloud/bugfix/noid/x-requested-with
Diffstat (limited to 'core/src/init.js')
-rw-r--r--core/src/init.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/init.js b/core/src/init.js
index f366dba5d1e..5c72f087630 100644
--- a/core/src/init.js
+++ b/core/src/init.js
@@ -35,6 +35,7 @@ import { setUp as setUpContactsMenu } from './components/ContactsMenu.js'
import { setUp as setUpMainMenu } from './components/MainMenu.js'
import { setUp as setUpUserMenu } from './components/UserMenu.js'
import PasswordConfirmation from './OC/password-confirmation.js'
+import { interceptRequests } from './utils/xhr-request.js'
// keep in sync with core/css/variables.scss
const breakpointMobileWidth = 1024
@@ -78,6 +79,8 @@ moment.locale(locale)
* Initializes core
*/
export const initCore = () => {
+ interceptRequests()
+
$(window).on('unload.main', () => { OC._unloadCalled = true })
$(window).on('beforeunload.main', () => {
// super-trick thanks to http://stackoverflow.com/a/4651049