请谁知道如何使用JWT从Spring后台获取音频文件。
<audio controls preload="none">
<source src="http://localhost:8080/url/getRecord/recordname" type="audio/wav">
</audio>但是音频标签get请求后台没有授权:承载,如何在html5音频标签的请求中添加授权头部?
发布于 2017-10-29 21:22:36
您可以将token添加到URL参数中,并像cookie一样使用token。我不确定你如何像这样配置你的后端,但是有了.net核心,这是可能的。这是我的应用程序,它使用这个https://github.com/JanneHarju/MultiSourcePlayList/blob/master/angular2App/app/modules/player/player.component.html,你可以在那里找到一个音频元素。
https://stackoverflow.com/questions/47000303
复制相似问题