簡體   English   中英

Google網站上的Apps腳本小工具開始引發CORS錯誤

[英]Apps Script Gadget on Google Site started throwing CORS errors

我有一個包含多個頁面的Google站點,所有頁面都包含一個Google Apps腳本小工具。 用戶報告說,幾個月前,Apps Script Gadgets停止工作。 我已經對其進行了測試,發現Apps Script小工具可以正確加載並顯示UI服務中的內容,但是,單擊任何運行功能的按鈕時,Apps Script小工具會掛起,並且瀏覽器中的控制台錯誤顯示:

Uncaught SecurityError: Failed to read the 'frame' property from 'Window': Blocked a frame                      
with origin "https://sites.google.com" from accessing a frame with origin
"https://xxxxxxxxxxxxxxxx-a-sites-opensocial.googleusercontent.com".
Protocols, domains, and ports must match.

Google是否更改了某種安全策略,以阻止向“應用腳本腳本”發出跨源請求? 有什么解決方法嗎?

謝謝

斯圖

我可以找到的唯一解決方案是用一個在新頁面中打開Apps腳本URL的鏈接替換小工具。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM