我正在嘗試通過XMLHttpRequest從Firebase存儲下載文件,但是未在資源上設(shè)置Access-Control-Allow-Origin,因此是不可能的。有什么方法可以在存儲服務(wù)器上設(shè)置此標頭? (let [xhr (js/XMLHttpRequest.)] (.open xhr "GET" url) (aset xhr "responseType" "arraybuffer") (aset xhr "onload" #(js/console.log "bin" (.-response xhr))) (.send xhr)))Chrome錯誤消息:XMLHttpRequest無法加載 https://firebasestorage.googleapis.com/[EDITED] 所請求的資源上沒有'Access-Control-Allow-Origin'標頭。因此,不允許訪問源' http:// localhost:3449 '。
- 3 回答
- 0 關(guān)注
- 596 瀏覽
添加回答
舉報
0/150
提交
取消