mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-15 15:10:31 -08:00
chore: disable useless csp
This commit is contained in:
parent
96ec9b20ef
commit
dd515c80ca
2 changed files with 18 additions and 18 deletions
|
|
@ -147,8 +147,8 @@ export class Window implements IWindowService {
|
|||
devTools: !isTest,
|
||||
nodeIntegration: false,
|
||||
nativeWindowOpen: true,
|
||||
webSecurity: !isDevelopmentOrTest,
|
||||
allowRunningInsecureContent: false,
|
||||
webSecurity: false,
|
||||
allowRunningInsecureContent: true,
|
||||
contextIsolation: true,
|
||||
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
|
||||
additionalArguments: [
|
||||
|
|
|
|||
|
|
@ -60,22 +60,22 @@ exports.renderer = _.compact([
|
|||
'process.env.NODE_ENV': `"${process.env.NODE_ENV ?? 'production'}"`,
|
||||
// global: {},
|
||||
}),
|
||||
new CspHtmlWebpackPlugin(
|
||||
{
|
||||
'base-uri': ["'self'"],
|
||||
'object-src': ["'none'"],
|
||||
'script-src': ["'self' 'unsafe-eval'"],
|
||||
'style-src': ["'self' 'unsafe-inline'"],
|
||||
'frame-src': ["'none'"],
|
||||
'worker-src': ["'none'"],
|
||||
'connect-src': ['https://api.github.com https://tiddlygit-desktop.authing.cn ws://localhost:3000'],
|
||||
},
|
||||
{
|
||||
nonceEnabled: {
|
||||
'style-src': false,
|
||||
},
|
||||
},
|
||||
),
|
||||
// new CspHtmlWebpackPlugin(
|
||||
// {
|
||||
// 'base-uri': ["'self'"],
|
||||
// 'object-src': ["'none'"],
|
||||
// 'script-src': ["'self' 'unsafe-eval'"],
|
||||
// 'style-src': ["'self' 'unsafe-inline'"],
|
||||
// 'frame-src': ["'none'"],
|
||||
// 'worker-src': ["'none'"],
|
||||
// 'connect-src': ['https://api.github.com https://tiddlygit-desktop.authing.cn ws://localhost:3000'],
|
||||
// },
|
||||
// {
|
||||
// nonceEnabled: {
|
||||
// 'style-src': false,
|
||||
// },
|
||||
// },
|
||||
// ),
|
||||
process.env.NODE_ENV === 'production' ? undefined : new WebpackBar(),
|
||||
process.env.NODE_ENV === 'production'
|
||||
? // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue