sessions: export staticPathsRE to be reused in tests.

This commit is contained in:
John McLear 2021-03-05 07:52:26 +00:00
parent d696a048dc
commit fd285c7748

View file

@ -23,7 +23,7 @@ const staticPathsRE = new RegExp(`^/(?:${[
'robots.txt', 'robots.txt',
'static/.*', 'static/.*',
'stats/?', 'stats/?',
'tests/frontend(?:/.*)?' 'tests/frontend(?:/.*)?',
].join('|')})$`); ].join('|')})$`);
exports.normalizeAuthzLevel = (level) => { exports.normalizeAuthzLevel = (level) => {
@ -198,3 +198,5 @@ exports.expressConfigure = (hookName, args, cb) => {
args.app.use((req, res, next) => { checkAccess(req, res, next).catch(next); }); args.app.use((req, res, next) => { checkAccess(req, res, next).catch(next); });
return cb(); return cb();
}; };
exports.staticPathsRE = staticPathsRE;