mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-14 17:19:37 +08:00
refactor: avoid promise overhead (#8028)
This commit is contained in:
@@ -35,7 +35,7 @@ const lazyloadRouteHandler = (routeHandlerPath) => (ctx) => {
|
||||
// index
|
||||
router.get('/', lazyloadRouteHandler('./routes/index'));
|
||||
|
||||
router.get('/robots.txt', async (ctx) => {
|
||||
router.get('/robots.txt', (ctx) => {
|
||||
if (config.disallowRobot) {
|
||||
ctx.set('Content-Type', 'text/plain');
|
||||
ctx.body = 'User-agent: *\nDisallow: /';
|
||||
|
||||
Reference in New Issue
Block a user