mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
missing cert and key error message
This commit is contained in:
parent
ef1b32d586
commit
83b4382787
@ -45,7 +45,8 @@ function calculateSmartValue(v) {
|
||||
module.exports = function (searchText) {
|
||||
// if the string doesn't start with attribute then we consider it as just standard full text search
|
||||
if (!searchText.trim().startsWith("@")) {
|
||||
const sanitizedSearchText = searchText.replace(/[^\w ]+/g, "");
|
||||
// replace with space instead of empty string since these characters are probably separators
|
||||
const sanitizedSearchText = searchText.replace(/[^\w ]+/g, " ");
|
||||
|
||||
return [
|
||||
{
|
||||
|
8
src/www
8
src/www
@ -35,6 +35,14 @@ async function startTrilium() {
|
||||
app.set('port', usedPort);
|
||||
|
||||
if (config['Network']['https']) {
|
||||
if (!config['Network']['keyPath'] || !config['Network']['keyPath'].trim().length) {
|
||||
throw new Error("keyPath in config.ini is required when https=true, but it's empty");
|
||||
}
|
||||
|
||||
if (!config['Network']['certPath'] || !config['Network']['certPath'].trim().length) {
|
||||
throw new Error("certPath in config.ini is required when https=true, but it's empty");
|
||||
}
|
||||
|
||||
const options = {
|
||||
key: fs.readFileSync(config['Network']['keyPath']),
|
||||
cert: fs.readFileSync(config['Network']['certPath'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user