File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Sources/Swift/Integrations/SessionReplay/RRWeb Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,29 @@ final class SentryRRWebOptionsEvent: SentryRRWebCustomEvent {
2626 payload [ " unmaskedViewClasses " ] = options. unmaskedViewClasses. map ( String . init ( describing: ) ) . joined ( separator: " , " )
2727 }
2828
29+ let networkDetailHasUrls = !options. networkDetailAllowUrls. isEmpty
30+ payload [ " networkDetailHasUrls " ] = networkDetailHasUrls
31+
32+ if networkDetailHasUrls {
33+ payload [ " networkDetailAllowUrls " ] = options. networkDetailAllowUrls. map { pattern in
34+ if let regex = pattern as? NSRegularExpression {
35+ return regex. pattern
36+ } else {
37+ return String ( describing: pattern)
38+ }
39+ }
40+ payload [ " networkDetailDenyUrls " ] = options. networkDetailDenyUrls. map { pattern in
41+ if let regex = pattern as? NSRegularExpression {
42+ return regex. pattern
43+ } else {
44+ return String ( describing: pattern)
45+ }
46+ }
47+ payload [ " networkCaptureBodies " ] = options. networkCaptureBodies
48+ payload [ " networkRequestHeaders " ] = options. networkRequestHeaders
49+ payload [ " networkResponseHeaders " ] = options. networkResponseHeaders
50+ }
51+
2952 super. init ( timestamp: timestamp, tag: " options " , payload: payload)
3053 }
3154}
You can’t perform that action at this time.
0 commit comments