Iframes
Host Iframe Control
By default BookStack will only allow itself to be embedded within iframes on the same domain as you’re hosting on. This is done through a CSP: frame-ancestors header. You can add additional trusted hosts by setting a ALLOWED_IFRAME_HOSTS
option in your .env
file like the example below:
|
Note: when this option is used, all cookies will served with SameSite=None
(info) set so that a user session can persist within the iframe.
Iframe Source Control
By default BookStack will only allow certain other hosts to be used as src
values for embedded iframe/frame content within the application. This is done through a CSP: frame-src header. You can configure the list of trusted sources by setting a ALLOWED_IFRAME_SOURCES
option in your .env
file like the examples below:
|
By default this option is configured as follows:
|
Note: The source of ‘self’ will always be automatically added to this CSP rule. In addition, the host used for the diagrams.net integration (If enabled) will be automatically appended to the lists of hosts.
No comments to display
No comments to display