nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Allow after request middleware

Open Barbapapazes opened this issue 1 year ago • 5 comments

Describe the feature

Hello,

I was thinking about after middleware like in express.

For example, if I've a middleware like this:

export default eventHandler(() => {
	console.log('before')
	next()
	console.log('after')
})

And a route like this:

export default eventHandler(() => {
	console.log('route')
	return
})

I expect:

before
route
after

This is not an API to implement but juste an example of what I've in mind

https://github.com/nuxt/nuxt/issues/21522

Additional information

  • [ ] Would you be willing to help implement this feature?

Barbapapazes avatar Jun 11 '23 20:06 Barbapapazes