Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,29 @@ public struct SentrySDKWrapper {
// Disable the fast view rendering, because we noticed parts (like the tab bar) are not rendered correctly
enableFastViewRendering: SentrySDKOverrides.SessionReplay.enableFastViewRendering.boolValue
)

// Configure network detail capture for testing
options.sessionReplay.networkDetailAllowUrls = [
"httpbin.org"
]

do {
let sentryDomainRegex = try NSRegularExpression(pattern: ".*\\.sentry\\.io.*", options: [])
options.sessionReplay.networkDetailDenyUrls = [sentryDomainRegex]
} catch {
preconditionFailure("Invalid regex pattern: \(error)")
}

options.sessionReplay.networkRequestHeaders = [
"User-Agent",
"X-Custom-Header",
"X-Request-ID"
]
options.sessionReplay.networkResponseHeaders = [
"Server",
"Access-Control-Allow-Origin",
"access-control-allow-credentials"
]
let defaultReplayQuality = options.sessionReplay.quality
options.sessionReplay.quality = SentryReplayOptions.SentryReplayQuality(rawValue: (SentrySDKOverrides.SessionReplay.quality.stringValue as? NSString)?.integerValue ?? defaultReplayQuality.rawValue) ?? defaultReplayQuality

Expand Down
Loading
Loading