Maison  >  Questions et réponses  >  le corps du texte

javascript - 从https前缀的网址上传文件到七牛

用了七牛的表单上传,在本地可以成功实现,但是部署上线后,因为服务器设置为https的网址,所以被chrome浏览器禁止了向upload.qiniu.com发送post请求的动作,有哪些办法可以解决?
错误信息:
Mixed Content: The page at 'https://my-app-url' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://upload.qiniu.com/'. This request has been blocked; the content must be served over HTTPS.

PHP中文网PHP中文网2749 Il y a quelques jours277

répondre à tous(1)je répondrai

  • PHPz

    PHPz2017-04-10 15:11:27

    可以直接修改上传的host为 https://up.qbox.me

    répondre
    0
  • Annulerrépondre