-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add content security policy, closes #141
- Loading branch information
1 parent
a58d68b
commit ec7e492
Showing
5 changed files
with
55 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Stacks Wallet</title> | ||
</head> | ||
|
||
<body> | ||
<div class="draggable-bar"></div> | ||
<div id="root"></div> | ||
<script> | ||
if (typeof process === 'object') { | ||
const scripts = []; | ||
|
||
if (process.env.NODE_ENV === 'development') { | ||
// Dynamically insert the DLL script in development env in the | ||
// renderer process | ||
scripts.push('../dll/renderer.dev.dll.js'); | ||
} | ||
if (process.env.START_HOT) { | ||
// Dynamically insert the bundled app script in the renderer process | ||
const port = process.env.PORT || 1212; | ||
scripts.push(`http://localhost:${port}/dist/renderer.dev.js`); | ||
} else { | ||
scripts.push('./dist/renderer.prod.js'); | ||
} | ||
|
||
if (scripts.length) { | ||
document.write( | ||
scripts.map(script => `<script defer src="${script}"><\/script>`).join('') | ||
); | ||
} | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters