Route filtering and SPAs
Use route filtering to hide BugFence on pages where reporting should not be available. Test the rules against your application’s routes, including client-side navigation.
BugFence.init({ projectKey: 'pk_live_your_public_key', endpoint: 'https://bugs.example.com/api/v1/reports', excludeUrls: ['/checkout/**', '#/admin/**']});excludeUrls takes precedence over includeUrls. If includeUrls is nonempty, a route must match at least one entry to be allowed. routePredicate can apply an additional custom decision.
Rules accept exact paths, full URLs, hash routes, regular expressions and functions. String patterns support * within one path segment and ** across segments. For example, /account/* matches a single segment, while /admin/** also matches nested paths and /admin itself. Exact paths also match an optional trailing slash.
On an excluded route, the launcher is hidden and opening the widget is blocked. When navigation makes a route excluded, an active recording is stopped and marked for discard. Route filtering is not a substitute for privacy controls or access control: review your application’s capture behavior and test transitions with representative sensitive pages.
See privacy and CSP for masking and configuration for other options.