Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Change: Insecure HTTP connections are disabled by default on iOS and Android. #15

Closed
PaRaDoX50 opened this issue Nov 21, 2020 · 4 comments

Comments

@PaRaDoX50
Copy link
Contributor

There are some breaking changes in the flutter's network policy : https://flutter.dev/docs/release/breaking-changes/network-policy-ios-android

Because of these changes, the app even on putting a right URL in the location field gives a "Invalid" toast.

In general the local host runs on HTTP. So we need to allow the use of http connections in debug builds.

@cyber-venom003
Copy link
Contributor

cyber-venom003 commented Nov 21, 2020

@PaRaDoX50 @harchani-ritik can you assign this to me?? As far as I've understood this issue, all I need to do is

<meta-data android:name="io.flutter.network-policy"
             android:resource="@xml/network_security_config"/>

Add this above line to network_security_config.xml for the android app.

@PaRaDoX50
Copy link
Contributor Author

@PaRaDoX50 @harchani-ritik can you assign this to me?? As far as I've understood this issue, all I need to do is

<meta-data android:name="io.flutter.network-policy"
             android:resource="@xml/network_security_config"/>

Add this above line to network_security_config.xml for the android app.

Actually, there are couple of ways to do it. We can either edit the Network Config file and add the code you sent above to the manifest file, if we want to allow HTTP connection for some specific domains or we can add one single attribute to the application tag to the manifest file if we want it for every address.
We need to edit the debug manifest file since we should only allow unsecure connection in debug mode.
Actually I was going to send a PR. I hope you don't mind.

@cyber-venom003
Copy link
Contributor

@PaRaDoX50 ya no issue, please go ahead🙂

@harchani-ritik
Copy link
Collaborator

@PaRaDoX50 Thanks for pointing out and fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants