Apps Script Gadget บน Google Site เริ่มส่งข้อผิดพลาด CORS

ฉันมี Google Site ที่มีหลายหน้าทั้งหมดมี Google Apps Script Gadget ผู้ใช้รายงานว่าเมื่อสองสามเดือนที่ผ่านมา Apps Script Gadgets หยุดทำงาน ฉันได้ทดสอบแล้ว และพบว่าแกดเจ็ต Apps Script โหลดอย่างถูกต้องและแสดงเนื้อหาจากบริการ UI อย่างไรก็ตาม เมื่อมีการคลิกปุ่มใดๆ ที่เรียกใช้ฟังก์ชัน Gadget สคริปต์ของ Apps จะหยุดทำงานและข้อผิดพลาดของคอนโซลในเบราว์เซอร์แสดง:

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 ได้เปลี่ยนแปลงนโยบายความปลอดภัยบางประเภทที่ป้องกันไม่ให้ส่งคำขอ Cross Origin ไปยัง Apps Script Scripts หรือไม่ มีวิธีแก้ไขปัญหาใด ๆ สำหรับสิ่งนี้หรือไม่?

ขอบคุณ

สตู


person StuWatson    schedule 14.03.2014    source แหล่งที่มา
comment
ให้ข้อมูลเพิ่มเติม คุณแทรกสคริปต์ลงในไซต์ได้อย่างไร? โดย URL? URL ขึ้นต้นด้วย 'script' หรือ 'sites'   -  person Zig Mandel    schedule 21.03.2014
comment
สคริปต์ถูกแทรกลงในไซต์โดยใช้ Google Apps Script Gadget URL ขึ้นต้นด้วย script.google.com   -  person StuWatson    schedule 26.03.2014
comment
ฉันจะลองใช้ลิงก์ที่เปิด Apps Script Gadget ในแท็บอื่นเพื่อแก้ไข <a href="https://URL to Your deployed AppsScript.com" target="_blank">My Gadget Name</a>   -  person Alan Wells    schedule 16.04.2014
comment
ฉันยินดีที่จะพิจารณาเรื่องนี้อีกสักหน่อย (ฉันเพิ่งร่วมงานกับ Google Gadgets ในโปรเจ็กต์หนึ่ง) หากคุณสามารถจัดเตรียมการนำไปปฏิบัติได้   -  person code4coffee    schedule 23.04.2014


คำตอบ (1)


วิธีแก้ปัญหาเดียวที่ฉันพบสำหรับปัญหานี้คือการแทนที่แกดเจ็ตด้วยลิงก์ที่เปิด URL สคริปต์ของ Apps ในหน้าใหม่

person StuWatson    schedule 25.04.2014