Skip to content

how can handle file download #359

@year520

Description

@year520

config:
var proxy=proxy({
target:config.core_system,
changeOrigin:true,
logLevel:'debug',
onProxyReq:function(proxyReq,req,res){
proxyReq.setHeader('Authorization',config.Authorization);
},
onProxyRes:function(proxyRes,req,res){
console.info(proxyRes.headers['content-type'])
}
})
app.use("/",proxy);
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.listen(config.port);

real api response context-type is application/octet-stream;charset=UTF-8
proxy api response context-type is application/json;charset=UTF-8

how can i fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions