forked from jsnbuchanan/crowd-funder-for-time-pwa
chore: linting for build
This commit is contained in:
@@ -84,21 +84,23 @@ function createWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add CSP headers to allow API connections
|
// Add CSP headers to allow API connections
|
||||||
mainWindow.webContents.session.webRequest.onHeadersReceived((details, callback) => {
|
mainWindow.webContents.session.webRequest.onHeadersReceived(
|
||||||
|
(details, callback) => {
|
||||||
callback({
|
callback({
|
||||||
responseHeaders: {
|
responseHeaders: {
|
||||||
...details.responseHeaders,
|
...details.responseHeaders,
|
||||||
'Content-Security-Policy': [
|
"Content-Security-Policy": [
|
||||||
"default-src 'self';" +
|
"default-src 'self';" +
|
||||||
"connect-src 'self' https://api.endorser.ch https://*.timesafari.app;" +
|
"connect-src 'self' https://api.endorser.ch https://*.timesafari.app;" +
|
||||||
"img-src 'self' data: https: blob:;" +
|
"img-src 'self' data: https: blob:;" +
|
||||||
"script-src 'self' 'unsafe-inline' 'unsafe-eval';" +
|
"script-src 'self' 'unsafe-inline' 'unsafe-eval';" +
|
||||||
"style-src 'self' 'unsafe-inline';" +
|
"style-src 'self' 'unsafe-inline';" +
|
||||||
"font-src 'self' data:;"
|
"font-src 'self' data:;",
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
})
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// Load the index.html
|
// Load the index.html
|
||||||
mainWindow
|
mainWindow
|
||||||
|
|||||||
Reference in New Issue
Block a user