[FIX] Allow self-signed certificates (#1310)

This commit is contained in:
Djorkaeff Alexandre 2019-10-16 17:12:13 -03:00 committed by Guilherme Gazzo
parent 4ac98a15c7
commit 05ef9f7d73
4 changed files with 11 additions and 9 deletions

View File

@ -4,5 +4,5 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:networkSecurityConfig="@xml/react_native_config" />
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
</manifest>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">localhost</domain>
<domain includeSubdomains="false">10.0.2.2</domain>
<domain includeSubdomains="false">10.0.3.2</domain>
</domain-config>
</network-security-config>

View File

@ -17,6 +17,7 @@
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config"
>
<activity
android:name=".MainActivity"

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>