You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/AdditionalAllowedFrameAncestors.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ To embed other sites in an trusted page with modified allowed frame ancestors
16
16
- Set AdditionalAllowedFrameAncestors property of the NavigationStartingEventArgs to a list additional allowed frame ancestors using the same syntax for the source list of [Content-Security-Policy frame-ancestors directive](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors). Basically, it is a space delimited list. All source syntax of Content-Security-Policy frame-ancestors directive are supported.
17
17
18
18
The list should normally only contain the origin of the top page.
19
-
If you are embedding other sites through nested iframes and the origins of some of the intermediate iframes are different from the origin of the top page and those origins might not be allowed by the site's original policies, the list should also include those origins. As an example, if you owns the content on https://example.com and https://www.example.com and uses them on top page and some intermediate iframes, you should set the list as "https://example.comhttps://www.example.com".
19
+
If you are embedding other sites through nested iframes and the origins of some of the intermediate iframes are different from the origin of the top page and those origins might not be allowed by the site's original policies, the list should also include those origins. As an example, if you owns the content on `https://example.com` and `https://www.example.com` and uses them on top page and some intermediate iframes, you should set the list as `https://example.com https://www.example.com`.
20
20
21
-
You should only add an origin to the list if it is fully trusted. When possible, you should try to limit the usage of the API to the targetted app scenarios. For example, we can set a specific name attribute to the iframe that is used to embed sites (something like `<iframe name="my_site_embedding_frame">`) and then detect the embedding scenario when the trusted page is navigated to and the embedding iframe is created.
21
+
You should only add an origin to the list if it is fully trusted. When possible, you should try to limit the usage of the API to the targetted app scenarios. For example, you can use an iframe with a specific name attribute to embed sites (something like `<iframe name="my_site_embedding_frame">`) and then detect the embedding scenario is active when the trusted page is navigated to and the embedding iframe is created.
/// and [Content-Security-Policy frame-ancestors directive](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors).
210
-
/// If set, a frame ancestor is allowed if it is allowed by the additional allowed frame ancestoers or original http header from the site.
211
+
/// If set, a frame ancestor is allowed if it is allowed by the additional allowed frame
212
+
/// ancestoers or original http header from the site.
211
213
/// Whether an ancestor is allowed by the additional allowed frame ancestoers is done the same way as if the site provided
212
214
/// it as the source list of the Content-Security-Policy frame-ancestors directive.
213
-
/// For example, if https://example.com and https://www.example.com are the origins of the top
214
-
/// page and intemediate iframes for a nested iframe that is embedding a site, and you fully trust
215
-
/// those origins, you should set thus property to "https://example.com https://www.example.com".
215
+
/// For example, if `https://example.com` and `https://www.example.com` are the origins of the top
216
+
/// page and intemediate iframes that embed a nested site embedding iframe, and you fully trust
217
+
/// those origins, you should set thus property to `https://example.com https://www.example.com`.
216
218
/// This property gives the app the ability to use iframe to embed sites that otherwise
217
219
/// could not be embedded in an iframe in trusted app pages.
218
220
/// This could potentially subject the embedded sites to [Clickjacking](https://en.wikipedia.org/wiki/Clickjacking)
0 commit comments