Desktop: use nodeIntegration

pull/1257/head
Laurent Cozic 2019-02-24 10:17:37 +00:00
parent 22cacd2c5b
commit 7d6b7e588c
3 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,9 @@ class ElectronAppWrapper {
y: windowState.y,
width: windowState.width,
height: windowState.height,
webPreferences: {
nodeIntegration: true,
},
};
// Linux icon workaround for bug https://github.com/electron-userland/electron-builder/issues/2098

View File

@ -2,6 +2,11 @@
<html>
<head>
<meta charset="UTF-8">
<!--
No CPS because we need to allow everything due to some dependencies (eg. depd, which comes from maybe Node or Electron
uses 'eval'.
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval'">
-->
<title>Joplin</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/fork-awesome.min.css">

View File

@ -205,6 +205,7 @@ class WebDavApi {
requestToCurl_(url, options) {
let output = [];
output.push('curl');
output.push('-v');
if (options.method) output.push('-X ' + options.method);
if (options.headers) {
for (let n in options.headers) {