­

#security

Android Network Security Configuration

<?xml version="1.0" encoding="utf-8"?>
<manifest>
<!-- https://developer.android.com/training/articles/security-config -->
<application android:networkSecurityConfig="@xml/network_security_config" />
</manifest>
<!-- app/src/debug/res -->
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<!-- we can enable clear text traffic for flipper in debug mode -->
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<!-- user certificates enabled for proxies, e.g. charles -->
<!-- <certificates src="user" /> -->
<certificates src="system" />
<!-- add custom certifcate source for certifcate pinning -->
<!-- <certificates src="@raw/mycertificate" /> -->
</trust-anchors>
</base-config>
</network-security-config>
<!-- app/src/main/res -->
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>