【发布时间】:2017-11-06 22:39:05
【问题描述】:
我正在使用 restify 来提供视频网址。我希望它播放而不是下载,虽然我在设置 Content-Type: video/mp4 时对此感到困惑,但随后我在邮递员中进行测试时看到了我的问题。响应头有Content-Type: octect-stream。
为什么 restify 没有采用我的标题设置或者我做错了什么?类似的问题here,但正如我所说,改变并没有发生。
这是我的简单代码:
let headers = { 'Content-Type': 'video/mp4' };
res.send(200, body, headers);
【问题讨论】:
标签: google-chrome mime-types mp4 content-type restify