From fd285c77482d19c2e95a05fa7ee1f33960be6209 Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 5 Mar 2021 07:52:26 +0000 Subject: [PATCH] sessions: export staticPathsRE to be reused in tests. --- src/node/hooks/express/webaccess.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index 5ff957a52..53573f2d6 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -23,7 +23,7 @@ const staticPathsRE = new RegExp(`^/(?:${[ 'robots.txt', 'static/.*', 'stats/?', - 'tests/frontend(?:/.*)?' + 'tests/frontend(?:/.*)?', ].join('|')})$`); exports.normalizeAuthzLevel = (level) => { @@ -198,3 +198,5 @@ exports.expressConfigure = (hookName, args, cb) => { args.app.use((req, res, next) => { checkAccess(req, res, next).catch(next); }); return cb(); }; + +exports.staticPathsRE = staticPathsRE;