javascript - 如何解决访问控制允许来源问题?

标签 javascript google-chrome kohana

flv 视频通常上传到我们的 Google 云端硬盘并创建到 iframe

喜欢

<iframe height="272" style="margin-top:-270px; position:absolute" src="https://drive.google.com/file/d/0BwgCehvr2FnlU3cwTTVzUXN5SXM/preview" width="440"></iframe>

其中的某些浏览器显示为“哎呀!播放此视频时出现问题。下载”但是如果我们单击右上角的“弹出”按钮,视频将在单独的选项卡上打开并播放。

XMLHttpRequest cannot load https://docs.google.com/get_video_info?docid=0BwFh_4qf05UOYnkxLW9Mb3dJRFU&authuser=0. Redirect from 'https://docs.google.com/get_video_info?docid=0BwFh_4qf05UOYnkxLW9Mb3dJRFU&authuser=0' to 'https://accounts.google.com/ServiceLogin?service=writely&passive=1209600&co…tps://drive.google.com/file/d/0BwFh_4qf05UOYnkxL&ltmpl=homepage&authuser=0' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://drive.google.com' is therefore not allowed access.

如何解决这个问题?

最佳答案

目前 Google 云端硬盘似乎存在问题:

https://productforums.google.com/forum/#!topic/drive/uACJyxwGbU0

关于javascript - 如何解决访问控制允许来源问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42018196/

相关文章:

javascript - jsSha HMAC 与加密 - OTP 算法不匹配

javascript - 单击按钮时清除表单文本框

php - Kohana3 : Different . htaccess rewritebase 和 kohana base_url 用于开发和生产环境

php - 如何在 Kohana 中获取 Controller 和操作名称

JavaScript - 将 eventListener 附加到没有 jQuery 的子元素

javascript - Ajax 简单调用不起作用

javascript - 使用 JavaScript 获取图像的真实宽度和高度? (在 Safari/Chrome 中)

google-chrome - 谷歌登录 "error": "popup_closed_by_user"

javascript - 如何使用 Chrome 开发者工具避免 Google Drive/Gmail 上下文菜单消失

linux - kohana_http_exception 404 : The requested URL/was not found on this server. - Linux 环境