mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
optimize directory structure
This commit is contained in:
11
lib/protected_router.js
Normal file
11
lib/protected_router.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const Router = require('koa-router');
|
||||
const router = new Router();
|
||||
const auth = require('koa-basic-auth');
|
||||
const config = require('./config');
|
||||
|
||||
router.use('/(.*)', auth(config.authentication));
|
||||
|
||||
// RSSHub
|
||||
router.get('/rsshub/rss', require('./routes/rsshub/rss'));
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user