Cordova-ios 6 + self signed certificate

Cordova 10.0.0
cordova-ios 6.1.0
F7 v1

Hello,
On our server we have self signed certificate working on nodejs (express) + we have this code there

app.use(function(request, response, next) {
response.header(“Access-Control-Allow-Origin”, “");
response.header(“Access-Control-Allow-Methods”, "
”);
response.header(“Access-Control-Allow-Headers”, “*”);
next();
});

We used before cordova-ios 5 and webview + cordova-plugin-certificates. We have no problems here. Everything worked as we need.

Now we update cordova to v 10.0.0 and cordova-ios 6.1.0.
So webview goodbye and now we have wkwebview. Before we did not use wkwebview’s plugins or something else.

After that we added in config.xml

preference name=“scheme” value=“app”
preference name=“hostname” value=“localhost”

We use ajax request to server and now we have problems with our requests after update
Also tried to add in info.plist

<dict>
	<key>NSExceptionDomains</key>
	<dict>
		<key>domain.ru</key>
		<dict>
			<key>NSExceptionAllowsInsecureHTTPLoads</key>
			<true/>
			<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
			<true/>
			<key>NSExceptionRequiresForwardSecrecy</key>
			<false/>
			<key>NSIncludesSubdomains</key>
			<true/>
		</dict>
	</dict>
	<key>NSAllowsArbitraryLoads</key>
	<true/>
	<key>NSAllowsLocalNetworking</key>
	<true/>
</dict>

We have error

[Error] Сертификат для данного сервера недействителен. Возможно, Вы подключаетесь к серверу, имитирующему «domain.ru», что может подвергнуть риску Вашу конфиденциальную информацию.
[Error] XMLHttpRequest cannot load https://domain.ru due to access control checks.

Google translate

[Error] The certificate for this server is invalid. Perhaps you are connecting to a server that imitates “domain.ru”, which may put your confidential information at risk.
[Error] XMLHttpRequest cannot load https://domain.ru due to access control checks.

So before in webview this plugin cordova-plugin-certificates solved our problem but now it is not working may be. May be someone know how to solve our problem?

hi
use lets encrypt ssl certificates. they are trusted certificates and free.

Good idea, but we can use only self signed certificate. such conditions in this situation…