mirror of
https://github.com/abrendan/MicDropMessages.git
synced 2025-08-25 22:12:02 +02:00
Initial commit
This commit is contained in:
10
node_modules/server/router/sub.js
generated
vendored
Normal file
10
node_modules/server/router/sub.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
const join = require('../src/join');
|
||||
|
||||
module.exports = (path, ...middle) => async ctx => {
|
||||
const full = ctx.req.subdomains.reverse().join('.');
|
||||
if ((typeof path === 'string' && path === full) ||
|
||||
(path instanceof RegExp && path.test(full))) {
|
||||
await join(middle)(ctx);
|
||||
ctx.req.solved = true;
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user