Browse Source

chore: linting for build

Matthew Raymer 1 week ago
parent
commit
16bc47921d
  1. 32
      src/electron/main.js

32
src/electron/main.js

@ -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(
callback({ (details, callback) => {
responseHeaders: { callback({
...details.responseHeaders, responseHeaders: {
'Content-Security-Policy': [ ...details.responseHeaders,
"default-src 'self';" + "Content-Security-Policy": [
"connect-src 'self' https://api.endorser.ch https://*.timesafari.app;" + "default-src 'self';" +
"img-src 'self' data: https: blob:;" + "connect-src 'self' https://api.endorser.ch https://*.timesafari.app;" +
"script-src 'self' 'unsafe-inline' 'unsafe-eval';" + "img-src 'self' data: https: blob:;" +
"style-src 'self' 'unsafe-inline';" + "script-src 'self' 'unsafe-inline' 'unsafe-eval';" +
"font-src 'self' data:;" "style-src 'self' 'unsafe-inline';" +
] "font-src 'self' data:;",
} ],
}) },
}) });
},
);
// Load the index.html // Load the index.html
mainWindow mainWindow

Loading…
Cancel
Save