附加安全性功能
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面詳細說明第三方外掛程式必須符合的安全規定。
來源限制
來源是指含有配置 (通訊協定)、主機 (網域) 和通訊埠的網址。如果兩個網址的配置、主機和通訊埠相同,就屬於同一來源。允許使用子來源。詳情請參閱 RFC 6454。
這些資源具有相同的配置、主機和通訊埠元件,因此屬於同一來源:
https://www.example.com
https://www.example.com:443
https://www.example.com/sidePanel.html
使用來源時,系統會強制執行下列限制:
外掛程式運作時使用的所有來源都必須使用 https
做為通訊協定。
外掛程式資訊清單中的 addOnOrigins
欄位必須填入外掛程式使用的來源。
addOnOrigins
欄位中的項目必須是相容的 CSP 主機來源值清單。例如 https://*.addon.example.com
或 https://main-stage-addon.example.com:443
。不允許使用資源路徑。
這份清單可用於:
如果應用程式在 iframe 內使用網址導覽,則所有導覽的來源都必須列在 addOnOrigins
欄位中。請注意,系統允許使用萬用字元子網域。例如:https://*.example.com
。不過,我們強烈建議不要使用您不擁有的網域 (例如 Firebase 擁有的 web.app
) 搭配萬用字元子網域。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-01 (世界標準時間)。
[null,null,["上次更新時間:2025-08-01 (世界標準時間)。"],[],[],null,["# Add-on security\n\nThis page details the security requirements third-party add-ons\nhave to fulfill.\n\nOrigin restrictions\n-------------------\n\nAn origin is a URL with a scheme (protocol), host (domain), and port. Two URLs\nhave the same origin when they share the same scheme, host, and port.\nSub-origins are permitted. For more information, see [RFC\n6454](https://www.ietf.org/rfc/rfc6454.txt).\n\nThese resources share the same origin as they have the same scheme, host, and\nport components:\n\n- `https://www.example.com`\n- `https://www.example.com:443`\n- `https://www.example.com/sidePanel.html`\n\nThe following constraints are enforced when working with origins:\n\n1. All [origins](/workspace/meet/add-ons/guides/overview#origin) used in the operation of\n your add-on must use `https` as the protocol.\n\n2. The `addOnOrigins` field in the [add-on\n manifest](/workspace/meet/add-ons/guides/deploy-add-on#create-deployment) must be\n populated with the origins that your add-on is\n using.\n\n The entries in the `addOnOrigins` field must be a list of [CSP host\n source](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#host-source)\n compatible values. For example `https://*.addon.example.com` or\n `https://main-stage-addon.example.com:443`. [Resource\n paths](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#path_to_resource)\n are not allowed.\n\n This list is used to:\n - Set the\n [`frame-src`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-src)\n value of the iframes containing your application.\n\n - Validate the URLs that your add-on is using.\n The origin used in the following locales must be part of the origins\n listed in the `addOnOrigins` field in the manifest:\n\n - The `sidePanelUri` field in the add-on\n manifest. For more information, see\n [Deploy a Meet add-on](/workspace/meet/add-ons/guides/deploy-add-on#create-deployment).\n\n - The `sidePanelUrl` and `mainStageUrl` properties in the\n [`AddonScreenshareInfo`](/workspace/meet/add-ons/reference/websdk/screenshare_api.addonscreenshareinfo)\n object. For more information, see\n [Promote an add-on to users through screen\n sharing](/workspace/meet/add-ons/guides/promote#screen_sharing).\n\n - The `sidePanelUrl` and `mainStageUrl` properties in the\n [`ActivityStartingState`](/workspace/meet/add-ons/reference/websdk/addon_sdk.activitystartingstate).\n For more information on activity starting state, see [Collaborate using a Meet add-on](/workspace/meet/add-ons/guides/collaborate-in-the-add-on).\n\n - Validate the origin of the site that's calling the\n [`exposeToMeetWhenScreensharing()`](/workspace/meet/add-ons/reference/websdk/screenshare_api.meetaddonscreenshare.exposetomeetwhenscreensharing)\n method.\n\n3. If your application uses URL navigation inside the iframe, all origins that\n are being navigated to must be listed in the `addOnOrigins` field. Note that\n wildcard subdomains are permitted. For example,\n `https://*.example.com`. However, we strongly advise against using wildcard\n subdomains with a domain you don't own, such as `web.app` which is owned by\n Firebase."]]