Skip to content

Commit

Permalink
webpack: add nonce to unsupported-browser-redirect chunk
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
pulsejet authored and nextcloud-command committed May 24, 2023
1 parent 4811a02 commit 60a7610
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions core/src/unsupported-browser-redirect.js
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions dist/core-unsupported-browser-redirect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 60a7610

Please sign in to comment.