From c1adae6d59c3d15c10e352cedba03e0630c6777f Mon Sep 17 00:00:00 2001 From: Maxime Cesson Date: Thu, 21 Jul 2022 18:44:21 +0200 Subject: [PATCH] Complete last commit (add og data to "Drive" and "File", handle missing config, modify nginx example config) --- build.js | 12 +++++++++++- docs/example.nginx.conf | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 82efd0279..c91c44f3e 100644 --- a/build.js +++ b/build.js @@ -1,6 +1,14 @@ var Fs = require("fs"); var Fse = require("fs-extra"); var Path = require("path"); + +if (!Fs.existsSync('./config/config.js')) { + console.log(`This script needs the file config/config.js to work properly. + You can make one by copying config/config.example.js. Check the + value of httpUnsafeOrigin for this script to behave as expected.` + .replace(/\s{2,}/g, ' ')); + process.exit(1); +} var config = require("./lib/load-config"); var swap = function (s, o) { @@ -86,7 +94,9 @@ var appIndexesToBuild = [ 'form', 'poll', 'whiteboard', - 'slide' + 'slide', + 'file', + 'drive' ]; appIndexesToBuild.forEach(function (app) { diff --git a/docs/example.nginx.conf b/docs/example.nginx.conf index 23139c58c..e4a6ca41b 100644 --- a/docs/example.nginx.conf +++ b/docs/example.nginx.conf @@ -242,5 +242,5 @@ server { } # Finally, serve anything the above exceptions don't govern. - try_files /www/$uri /www/$uri/index.html /customize/$uri; + try_files /customize/www/$uri /customize/www/$uri/index.html /www/$uri /www/$uri/index.html /customize/$uri; }