mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
feat: make it secure
This commit is contained in:
parent
94fe3a417b
commit
6df3ca5739
4 changed files with 6 additions and 2 deletions
|
|
@ -5,6 +5,8 @@ const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
|
|||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV === 'development';
|
||||
|
||||
exports.main = [
|
||||
// we only need one instance of TsChecker, it will check main and renderer all together
|
||||
// new ForkTsCheckerWebpackPlugin(),
|
||||
|
|
@ -34,7 +36,7 @@ exports.renderer = [
|
|||
{
|
||||
'base-uri': ["'self'"],
|
||||
'object-src': ["'none'"],
|
||||
'script-src': ["'self' 'unsafe-eval'"],
|
||||
'script-src': [`'self' ${isDevelopment ? "'unsafe-eval'" : ''}`],
|
||||
'style-src': ["'self' 'unsafe-inline'"],
|
||||
'frame-src': ["'none'"],
|
||||
'worker-src': ["'none'"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue