Last active
October 14, 2022 11:26
-
-
Save kibotu/1f91115dcc7e19f30db24ff418c04711 to your computer and use it in GitHub Desktop.
Network Security Config Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest> | |
<!-- https://developer.android.com/training/articles/security-config --> | |
<application android:networkSecurityConfig="@xml/network_security_config" /> | |
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment