non secure websocket connection is blocked for HTTPS pages by wkwebview with ATS disabled
Hi,
We have Mac OS application which uses wkwebview to display html pages from our server. This page is served over HTTPS. We also have websocket server running in our application at localhost. Till Mac 14, our https page was able to connect to our application's websocket server using non secure websocket connection. With Mac 15, this connection is blocked by WebView requiring secure web socket connection. disabling ATS security didn't work. below is added in plist file of the application.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
<key>NSAllowsArbitraryLoadsForMedia</key><true/>
<key>NSAllowsArbitraryLoadsInWebContent</key><true/>
<key>NSAllowsLocalNetworking</key><true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key><true/>
<key>NSIncludesSubdomains</key><true/>
</dict>
</dict>
</dict>
This issue is seen only with Mac OS 15. In Earlier version, with ATS security disabled, this issue is not seen. With ATS disabled, These non secure websocket connections should not be blocked.
Xcode Version: 12.2