🗒️Nestjs Middleware
type
status
slug
date
summary
tags
category
password
icon
Middleware functions can perform the following tasks:
中间件功能可以执行以下任务:
- execute any code.
执行任何代码。
- make changes to the request and the response objects.
更改请求和响应对象。
- end the request-response cycle.
结束请求-响应周期。
- call the next middleware function in the stack.
调用堆栈中的下一个中间件函数。
- if the current middleware function does not end the request-response cycle, it must call
next()
to pass control to the next middleware function. Otherwise, the request will be left hanging.
如果当前的中间件函数没有结束请求-响应周期,则必须调用
next()
将控制权传递给下一个中间件函数。否则,请求将被挂起。自定义请求记录
上一篇
Nestjs Pipe用法
下一篇
nestjs/schedule nestjs定时任务
Loading...