Skip to content

Named middleware not running? + Empty response #89

@theoludwig

Description

@theoludwig

Package version

6.12.1

Describe the bug

Apparently named middleware are not working, when .use one it sends a 200 Ok, empty response.

Steps to reproduce are pretty minimal/small:

  • npm init adonisjs@latest adonis-slim-kit -- --kit=slim
  • node ace make:middleware foobar --stack=named
  • Edit start/routes.ts to use the middleware:
import router from '@adonisjs/core/services/router'
import { middleware } from '#start/kernel'

router.get('/', async () => 'It works!').use(middleware.foobar)

"It works" is never sent (empty response, only 200 Ok), and removing .use(middleware.foobar) make it work again.

Metadata

Metadata

Assignees

Labels

Good First IssueWant to contribute? Just filter by this labelStatus: AbandonedDropped and not into consideration

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions