From 9076844c9fa3e30389a6e697d8a649d789d9d9a7 Mon Sep 17 00:00:00 2001 From: Graham Smith Date: Thu, 30 Jul 2020 14:20:25 +0100 Subject: [PATCH 1/4] Only enable HTTP and user CAs on debug builds and --- .../app/src/main/res/xml/network_security_config.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/res/xml/network_security_config.xml b/android/app/src/main/res/xml/network_security_config.xml index bb6ab93df02..9ba2ada7f4b 100644 --- a/android/app/src/main/res/xml/network_security_config.xml +++ b/android/app/src/main/res/xml/network_security_config.xml @@ -1,9 +1,16 @@ - + - + + + + + + + + \ No newline at end of file From 12a4e40ee2469282d34cf799d449ee06168fb513 Mon Sep 17 00:00:00 2001 From: Graham Smith Date: Thu, 30 Jul 2020 14:22:59 +0100 Subject: [PATCH 2/4] Allow User CAs in prod --- android/app/src/main/res/xml/network_security_config.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/res/xml/network_security_config.xml b/android/app/src/main/res/xml/network_security_config.xml index 9ba2ada7f4b..8f9e22cae87 100644 --- a/android/app/src/main/res/xml/network_security_config.xml +++ b/android/app/src/main/res/xml/network_security_config.xml @@ -1,8 +1,10 @@ - + + From e97af3285d19db738edf2a41f4ecd3f60805b444 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 2 Sep 2020 11:19:18 -0300 Subject: [PATCH 3/4] Add config on debug --- android/app/src/debug/AndroidManifest.xml | 3 ++- .../app/src/debug/res/xml/network_security_config.xml | 9 +++++++++ android/app/src/main/res/xml/network_security_config.xml | 8 -------- 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 android/app/src/debug/res/xml/network_security_config.xml diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index ed773abe1ae..bc6c63eab3c 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -7,7 +7,8 @@ android:name=".MainDebugApplication" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:name" - tools:targetApi="28" /> + tools:targetApi="28" + android:networkSecurityConfig="@xml/network_security_config" /> \ No newline at end of file diff --git a/android/app/src/debug/res/xml/network_security_config.xml b/android/app/src/debug/res/xml/network_security_config.xml new file mode 100644 index 00000000000..ce3b3c52df0 --- /dev/null +++ b/android/app/src/debug/res/xml/network_security_config.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/xml/network_security_config.xml b/android/app/src/main/res/xml/network_security_config.xml index 8f9e22cae87..ef899d459b6 100644 --- a/android/app/src/main/res/xml/network_security_config.xml +++ b/android/app/src/main/res/xml/network_security_config.xml @@ -7,12 +7,4 @@ tools:ignore="AcceptsUserCertificates" /> - - - - - - - - \ No newline at end of file From 2b3f42a1ca947a5eddd95341b73330298f197f8f Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 2 Sep 2020 13:25:21 -0300 Subject: [PATCH 4/4] Add lint --- android/app/src/debug/res/xml/network_security_config.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/src/debug/res/xml/network_security_config.xml b/android/app/src/debug/res/xml/network_security_config.xml index ce3b3c52df0..45f56937ca3 100644 --- a/android/app/src/debug/res/xml/network_security_config.xml +++ b/android/app/src/debug/res/xml/network_security_config.xml @@ -2,8 +2,9 @@ - + \ No newline at end of file