Browse Source

chore: linting for build

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

16
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(
(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

Loading…
Cancel
Save