You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand, this option is needed to connect to a local Metro server. But it is not required for production builds. However, it could potentially become a security threat to the application.
Details
I suggest adding an automatic switch for this parameter: NSAllowsLocalNetworking: true only for debug builds, and NSAllowsLocalNetworking: false for production.
Discussion points
Maybe I don't fully understand the architecture of react native, and this parameter is used for some external needs. If so, please write about it.
But if there is any sense in my words, then please write an example of code implementation to add this switch.
The text was updated successfully, but these errors were encountered:
danilvalov
changed the title
[iOS] SwitchNSAllowsLocalNetworking to false in production build
[iOS] Switch NSAllowsLocalNetworking to false in production build
Apr 23, 2025
Introduction
As I understand, this option is needed to connect to a local Metro server. But it is not required for production builds. However, it could potentially become a security threat to the application.
Details
I suggest adding an automatic switch for this parameter:
NSAllowsLocalNetworking: true
only for debug builds, andNSAllowsLocalNetworking: false
for production.Discussion points
Maybe I don't fully understand the architecture of react native, and this parameter is used for some external needs. If so, please write about it.
But if there is any sense in my words, then please write an example of code implementation to add this switch.
The text was updated successfully, but these errors were encountered: