Skip to content

Commit

Permalink
Merge pull request #88 from awslabs/webView-disable-js
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankiesz authored Apr 26, 2024
2 parents 95f10b6 + 96bfdf6 commit eeaef50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Swift/KVSiOSApp/SignalingClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ final class SignalingClient {
init(serverUrl: URL) {
var request: URLRequest = URLRequest(url: serverUrl)

let UA = WKWebView().value(forKey: "userAgent") as? String?
let webView = WKWebView()
webView.configuration.preferences.javaScriptEnabled = false

let UA = webView.value(forKey: "userAgent") as? String?
if let agent = UA {
request.setValue(appName + "/" + appVersion + " " + agent!, forHTTPHeaderField: userAgentHeader)
} else {
Expand Down

0 comments on commit eeaef50

Please sign in to comment.