一直没问题,突然https://www.jsdelivr.com/的vue-video-player插件打不开,报错403,导致整个H5打不开,出现白屏。
错误信息如下:
403
Forbidden
Error Times: Thu, 30 Jul 2020 07:18:09 GMT
IP: 2409:8954:3090:37ff:1d4a:c622:f526:a325Node information: shanydong26:22
URL: https://cdn.jsdelivr.net/npm/vue-video-player@5.0.2/dist/vue-video-player.js
Check: Details
ERROR
The Requested URL could not be retrieved
While trying to retrieve the URL:
https://cdn.jsdelivr.net/npm/vue-video-player@5.0.0/dist/vue-video-player.js
The following error was encountered:
Invalid Request
The access control configuration prevents your request at this time.
Please contact your service provider if you feel this is incorrect.
return
解决方法:
1、打开index.html文件,注释掉vue-video-player插件的CDN链接。
2、打开build/webpack.base.conf.js文件,注释掉’vue-video-player’: ‘VueVideoPlayer’,
3、重新打包,部署到服务器。问题解决。
没有备用CDN,就是个坑。因为其它免费CDN服务器,没有vue-video-player插件,所以,我没有做备用处理。
本文解决了一个在H5应用中使用vue-video-player插件遇到的问题,该插件从CDN加载时出现403错误,导致页面无法正常显示。通过注释掉CDN链接并调整webpack配置,重新打包部署后问题得以解决。
977

被折叠的 条评论
为什么被折叠?



