From d027cf14382da55c3c47bc2c5a448835ea3bb593 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Wed, 11 Oct 2023 17:00:49 +0200 Subject: [PATCH] fix: CSP issue on loading RichWorkspace component Signed-off-by: Luka Trovic --- src/helpers/files.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers/files.js b/src/helpers/files.js index f2fbb840aa0..fb6fe6bd844 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -22,7 +22,7 @@ import { emit } from '@nextcloud/event-bus' import { Header } from '@nextcloud/files' -import { imagePath } from '@nextcloud/router' +import { imagePath, linkTo } from '@nextcloud/router' import { loadState } from '@nextcloud/initial-state' import { getSharingToken } from './token.js' @@ -30,6 +30,9 @@ import { openMimetypes } from './mime.js' import RichWorkspace from '../views/RichWorkspace.vue' import store from '../store/index.js' +__webpack_nonce__ = window.btoa(OC.requestToken) // eslint-disable-line +__webpack_public_path__ = linkTo('text', 'js/') // eslint-disable-line + const FILE_ACTION_IDENTIFIER = 'Edit with text app' const optimalPath = function(from, to) {