mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-14 09:12:01 +08:00
* Add http basic authentication closes #560 * Add docs * Add http basic authentication middleware * Minor update * Move settings to config.js
12 lines
290 B
JavaScript
Executable File
12 lines
290 B
JavaScript
Executable File
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;
|