2017-06-22 43 views

回答

0

我找到自己的答案

app.use(async function(ctx, next){ 
    await next(); 
    if (ctx.url.toLowerCase().includes('.plist')) { 
     ctx.type = 'text/xml'; 
    }else if (ctx.url.toLowerCase().includes('.ipa')) { 
     ctx.type = 'application/octet-stream'; 
    } 
}); 

在每隔app.use(XXX)