Skip to content

Commit

Permalink
webpack: add nonce to unsupported-browser-redirect chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed May 20, 2023
1 parent 428366c commit 9882a5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/unsupported-browser-redirect.js
Expand Up @@ -19,6 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import { getRequestToken } from '@nextcloud/auth'

// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(getRequestToken())

if (!window.TESTING && !OC?.config?.no_unsupported_browser_warning) {
window.addEventListener('DOMContentLoaded', async function() {
const { testSupportedBrowser } = await import('./utils/RedirectUnsupportedBrowsers.js')
Expand Down

0 comments on commit 9882a5f

Please sign in to comment.