问题描述
我正在使用 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.