-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[IMPROVEMENT] Disable HTTP for production on Android #2357
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
Changes from 3 commits
9076844
12a4e40
02d98fd
f944aab
e97af32
2b3f42a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <network-security-config> | ||
| <base-config cleartextTrafficPermitted="true"> | ||
| <network-security-config xmlns:tools="http://schemas.android.com/tools"> | ||
| <base-config cleartextTrafficPermitted="false"> | ||
| <trust-anchors> | ||
| <certificates src="system" /> | ||
| <certificates src="user" /> | ||
| <certificates src="user" | ||
| tools:ignore="AcceptsUserCertificates" /> | ||
| </trust-anchors> | ||
| </base-config> | ||
| <debug-overrides> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like it's not working. That's because the JS bundle is sent to the device via port 8081 and it needs
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll take a look - I forgot about how RN debugging works as I tried with a production build. 👍 |
||
| <base-config cleartextTrafficPermitted="true" > | ||
| <trust-anchors> | ||
| <certificates src="user" /> | ||
| <certificates src="system" /> | ||
| </trust-anchors> | ||
| </base-config> | ||
| </debug-overrides> | ||
| </network-security-config> | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grahamsmith Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Android Studio's linter highlights this as a security risk and so the ignore tells it not to worry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!