From 453d33dcfc450b01543ed1ffccb449740934af87 Mon Sep 17 00:00:00 2001 From: g-div Date: Thu, 7 Jun 2018 13:32:03 +0200 Subject: [PATCH] fix(RSS): use temporary site_url Closes #74 --- src/server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server.js b/src/server.js index 5a19892..ef24513 100644 --- a/src/server.js +++ b/src/server.js @@ -125,9 +125,11 @@ function run(db) { // rss feed of comments in need of moderation app.get('/feed', (request, reply) => { + const user = getUser(request); + if (!isAdmin(user)) return reply.status(403).send({error: 'Forbidden'}); var feed = new RSS({ title: 'Awaiting moderation', - site_url: config.allow_origin[0] // @FIXME + site_url: config.get('schnack_host') }); db.each(queries.awaiting_moderation, (err, row) => { if (err) console.error(err.message);