From 2d10fe591ab450b56c39080abbb5e3e5cb8e25bf Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 4 Apr 2025 16:29:01 +0200 Subject: [PATCH] Improve plugins options --- lib/http-worker.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/http-worker.js b/lib/http-worker.js index 7a4a1778d..a0684dabf 100644 --- a/lib/http-worker.js +++ b/lib/http-worker.js @@ -326,6 +326,12 @@ app.use(function (req, res, next) { next(); }); +Object.keys(plugins || {}).forEach(name => { + let plugin = plugins[name]; + if (!plugin.addHttpEndpoints) { return; } + plugin.addHttpEndpoints(Env, app); +}); + // serve custom app content from the customize directory // useful for testing pages customized with opengraph data @@ -536,12 +542,6 @@ app.use("/block", (req, res, next) => { next(); }); -Object.keys(plugins || {}).forEach(name => { - let plugin = plugins[name]; - if (!plugin.addHttpEndpoints) { return; } - plugin.addHttpEndpoints(Env, app); -}); - app.use("/customize", Express.static('customize')); app.use("/customize", Express.static('customize.dist')); app.use("/customize.dist", Express.static('customize.dist'));