-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
只应用于 API #24
Comments
同样的问题,应该有restc.koa2({exclude: ['/exclude_url'], path: ['/include_url']}) 这种初始化操作。 |
你的需求可以用 koajs/mount 解决,比如: app.use(mount('/api', restc())) |
koa-mount这种方式只解决了include的问题,但没有解决exclude。从本质上来讲这个还是middleware的配置问题,如果再用一个其他middleware来解决的话就不够优雅了。 |
@lujjjh 只是实现需求的话,issue 中也给出了我自己的实现方式,然后看了下源码目前 options 还是没有什么选项的,我认为可以为 options 添加一些选项,让使用这个中间件的体验更好。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
今天第一次用,发现页面也成为了 restc 的页面, 所以有没有一些选项能让我指定只针对某些规则的 url . 或者其他的方式可以绕过不应该转变为 restc 的页面
我目前是这么做的:
The text was updated successfully, but these errors were encountered: