@@ -54,36 +54,43 @@ currently supported.
54
54
55
55
## Advanced: HTML rendering and Quilt Package File Server
56
56
57
- The Quilt Catalog supports HTML and JavaScript in preview via iframes. By default,
58
- preview iframes do not have IAM permissions and are therefore unable to access
59
- private files in S3.
57
+ The Quilt Catalog supports HTML and JavaScript in preview via iframes. By
58
+ default, preview iframes do not have IAM permissions and are therefore unable to
59
+ access private files in S3.
60
60
61
61
If you wish for your HTML to access data within the enclosing package or bucket
62
- (at the viewer's level of permissions) and/or use origin-aware Web APIs
63
- such as data storage/cookies, you must opt in to
64
- ` Enable permissive HTML rendering ` in [ Bucket settings] ( Admin.md#buckets ) .
62
+ (at the viewer's level of permissions) and/or use origin-aware Web APIs such as
63
+ data storage/cookies, you must opt in to ` Enable permissive HTML rendering ` in
64
+ [ Bucket settings] ( Admin.md#buckets ) . This explicitly allows cross-origin resource
65
+ sharing (CORS).
65
66
66
67
> You should _ only enable this feature for buckets where you implicitly
67
68
> trust_ the contents of the HTML files.
68
69
69
- Depending on the context where the HTML file is rendered (package vs bucket view),
70
- the iframe gets the following origin:
70
+ Depending on the context where the HTML file is rendered (package vs bucket
71
+ view), the iframe gets the following origin:
71
72
72
73
* Inside a package view with permissive rendering ** enabled** :
73
74
the origin is the ** Quilt Package File Server** .
74
75
75
76
* Inside a bucket view with permissive rendering ** enabled** :
76
77
the origin is the AWS S3 bucket endpoint.
77
78
78
- * With permissive rendering ** disabled** (irrespective of package or bucket view):
79
- the resource is treated as being from a special origin that always fails the
80
- same-origin policy
81
- ( [ ` allow-same-origin ` iframe sandbox token] ( https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox )
79
+ * With permissive rendering ** disabled** (irrespective of package or bucket
80
+ view): the resource is treated as being from a special origin that always
81
+ fails the same-origin policy ( [ ` allow-same-origin ` iframe sandbox
82
+ token] ( https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox )
82
83
is not set).
83
84
84
85
> An important implication of same-origin policy is that the scripts
85
86
> executed under the same origin share LocalStorage data and cookies.
86
87
88
+ ### Allowing Forms and Popups
89
+
90
+ > New in Quilt Platform version 1.59.0 or higher
91
+
92
+ Enabling Permissive HTML now allows forms and popups to work from iframes.
93
+
87
94
### Package view example with permissive rendering enabled
88
95
89
96
1 . ` report.html ` is a file in a package that includes a publicly available JS
0 commit comments