'How to implement hostname verification on React-native?

After a security audit, our app, built on react-native (8.1.2) for both android and iOS, is required to have Hostname verification. Given that it is set up by default on iOS, how can I implement hostname verification on android side using react-native code?

How can I test the implementation after setting it up?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source