Skip to content

Commit

Permalink
fix: entry script CSP for Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
filoozom committed Sep 12, 2023
1 parent 4cc2512 commit 565dd45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib/objects/external/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const getNPMObject = async (
if (!added['script-src']) {
added['script-src'] = ''
}
added['script-src'] += ` ${window.location.origin + script}`

return {
script,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/objects/external/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <meta http-equiv="Content-Security-Policy" content="__CSP__" /> -->
<meta http-equiv="Content-Security-Policy" content="__CSP__" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
* {
Expand Down

0 comments on commit 565dd45

Please sign in to comment.