Merge pull request #12331 from kialam/fix-worker-json-404

Allow worker files to be loaded as blob objects.
This commit is contained in:
Jessica Steurer 2022-06-07 16:33:59 -03:00 committed by GitHub
commit 309178e4e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;