File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,20 @@ defmodule ErrorTracker.Web do
1313
1414 ...
1515
16- error_tracker_dashboard "/errors"
16+ scope "/" do
17+ ...
18+
19+ error_tracker_dashboard "/errors"
20+ end
1721 end
1822 ```
1923
2024 This will add the routes needed for ErrorTracker's dashboard to work.
2125
26+ **Note:** when adding the dashboard routes, make sure you do it in an scope that
27+ has CSRF protection (usually the `:browser` pipeline in most projects), as
28+ otherwise you may experience LiveView issues like crashes and redirections.
29+
2230 ## Security considerations
2331
2432 Errors may contain sensitive information, like IP addresses, users information
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ defmodule ErrorTracker.Web.Router do
1010
1111 It requires a path in which you are going to serve the web interface.
1212
13+ In order to work properly, the route should be in a scope with CSRF protection
14+ (usually the `:browser` pipeline).
15+
1316 ## Security considerations
1417
1518 The dashboard inlines both the JS and CSS assets. This means that, if your
You can’t perform that action at this time.
0 commit comments