We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请教一下, 在做微信分享的过程遇到的路由问题。 怎样才能通过 http://www.xxxx.com/MP_verify_aaaaaaaaaa.txt 该链接访问到 MP_verify_aaaaaaaaaa.txt资源?
http://www.xxxx.com/MP_verify_aaaaaaaaaa.txt
MP_verify_aaaaaaaaaa.txt
通过配置中间件插件(静态化)可以吗?这样做是否合理
module.exports.static = function(app, conf){ return function(){ app.use(conf.urlPattern, yog.express.static(conf.staticPath, conf.options)); app.use('/MP_verify_aaaaaaaaaa.txt', yog.express.static(yog.ROOT_PATH + '/MP_verify_aaaaaaaaaa.txt', conf.options)); //拦截404 app.use(conf.urlPattern, conf.notFound); }; }; module.exports.static.defaultConf = { options: { maxAge: 0 }, staticPath: yog.ROOT_PATH + '/static', urlPattern: '/static', notFound: function(req, res){ res.status(404); res.send('404: Resource not Found'); } };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
请教一下, 在做微信分享的过程遇到的路由问题。 怎样才能通过
http://www.xxxx.com/MP_verify_aaaaaaaaaa.txt
该链接访问到MP_verify_aaaaaaaaaa.txt
资源?通过配置中间件插件(静态化)可以吗?这样做是否合理
The text was updated successfully, but these errors were encountered: