chore: linting for build

This commit is contained in:
Matthew Raymer
2025-02-13 06:59:06 +00:00
parent 9a966ef04d
commit 16bc47921d

View File

@@ -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