WSO2 api 管理器不传播多部分表单数据的内容类型标头 [英] WSO2 api manager not propagating content type header for multipart form data

查看:36
本文介绍了WSO2 api 管理器不传播多部分表单数据的内容类型标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 WSO2 api manager 1.10.0.我在使用 multipart/form-data 时遇到问题,实际上我注意到 content type 标头没有传播到我的后端服务,因此我收到了不受支持的媒体类型 415 HTTP 错误.请知道如何解决这个问题?

I'm using WSO2 api manager 1.10.0. I have a problem when using multipart/form-data , in fact i noticed that content type header isn't propagated to my back end service and so I'm getting unsupported media type 415 HTTP error. Please any idea how to fix this?

推荐答案

将以下属性添加到 repository/conf/passthru-http.properties 文件中.http.headers.preserve=内容类型

Add the following property to repository/conf/passthru-http.properties file. http.headers.preserve=Content-Type

这将保留您随请求发送的内容类型标头并将其发送到后端.如果你想保留更多这样的标题,你可以将它们添加到同一行,用逗号分隔.

This will preserve the content type header you send with the request and send it to the backend. If you want to preserve more such headers, you can add them to the same line with comma separated.

这篇关于WSO2 api 管理器不传播多部分表单数据的内容类型标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆