Allow worker files to be loaded as blob objects.

This commit is contained in:
Kia Lam 2022-06-06 10:47:30 -07:00
parent 8c3e289170
commit 48b3a43ec2
2 changed files with 1 additions and 4 deletions

View File

@ -24,7 +24,7 @@
</script>
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; connect-src 'self' ws: wss:; style-src 'self' 'unsafe-inline'; script-src 'self' 'nonce-{{ csp_nonce }}' *.pendo.io https://d3js.org; img-src 'self' *.pendo.io data:; worker-src 'self';"
content="default-src 'self'; connect-src 'self' ws: wss:; style-src 'self' 'unsafe-inline'; script-src 'self' 'nonce-{{ csp_nonce }}' *.pendo.io https://d3js.org; img-src 'self' *.pendo.io data:; worker-src 'self' blob: ;"
/>
<link rel="shortcut icon" href="{% static 'media/favicon.ico' %}" />
<% } else { %>

View File

@ -1,6 +1,5 @@
import React, { useEffect, useRef, useCallback } from 'react';
import { oneOf, bool, number, string, func, oneOfType } from 'prop-types';
import { config } from 'ace-builds';
import ReactAce from 'react-ace';
import 'ace-builds/src-noconflict/mode-json';
@ -13,8 +12,6 @@ import { t } from '@lingui/macro';
import styled from 'styled-components';
import debounce from 'util/debounce';
config.set('loadWorkerFromBlob', false);
const LINE_HEIGHT = 24;
const PADDING = 12;