-
Notifications
You must be signed in to change notification settings - Fork 693
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
server.conf proxy不支持post请求吗? #927
Comments
属于Node.js问题,不属于FIS问题。 |
@hefangshi ,。。。。 nodejs能处理post请求啊,更何况你们还内置了express |
proxy post确实有点问题啊,get正常。 |
注意,目标文件发布后必须是 /test 或者 /mock 目录,否则,默认的 express-static 是不支持 post 请求到静态文件的。 |
@2betop 我们说的是proxy不支持Post 正常的rewrite是支持的。 |
中间件顺序的问题, app.js app.use(require('yog-devtools')({
view_path: '', // 避免报错。
rewrite_file: [path.join(DOCUMENT_ROOT, 'config', 'server.conf'), path.join(DOCUMENT_ROOT, 'mock', 'server.conf')],
data_path: [path.join(DOCUMENT_ROOT, 'test'), path.join(DOCUMENT_ROOT, 'mock')]
}));
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json()) 即把 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
get请求是OK的。
post请求,我写了一个node服务器,在写了data对象之后,
另外有同事反馈说post传递过去的data,java接收不了。
The text was updated successfully, but these errors were encountered: