Skip to content

Commit 8f72ef4

Browse files
authored
Document CSP settings for dashboard (#49)
The dashboard inlines both the JS and CSS assets. Users with a Content Security Policy need to allow inline assets for the dashboard to work properly. Closes #48
1 parent 75bfa23 commit 8f72ef4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/error_tracker/web.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ defmodule ErrorTracker.Web do
3434
You can find more details on
3535
`ErrorTracker.Web.Router.error_tracker_dashboard/2`.
3636
37+
### Static assets
38+
39+
Static assets (CSS and JS) are inlined during the compilation. If you have
40+
a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
41+
be sure to allow inline styles and scripts.
42+
43+
To do this, ensure that your `style-src` and `script-src` policies include the
44+
`unsafe-inline` value.
45+
3746
## LiveView socket options
3847
3948
By default the library expects you to have your LiveView socket at `/live` and

0 commit comments

Comments
 (0)