Replies: 1 comment 2 replies
-
正常,为了不影响动态路由,staticFile的优先级的非常高,用的 insertFirst,如果想在这个中间件前加自定义中间件,也得插入到最前面了。https://github.com/midwayjs/midway/blob/main/packages/static-file/src/configuration.ts#L39 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the problem(描述问题)
使用静态文件托管组件 @midwayjs/static-file@3起一个静态服务,然后自定义一个中间件打印静态文件路径 ,访问静态文件自定义中间件无法监听到路径
static.middleware.ts(中间件文件)
configuration.ts(配置文件)
Midway Versions(Midway 版本)
"@midwayjs/core": "^3.16.2",
"@midwayjs/static-file": "^3.16.2"
Beta Was this translation helpful? Give feedback.
All reactions