Skip to content
Browse files

Add Network Security Config file (fixes #22375) (#23105)

This fixes #22375. Android API level 28 and above now blocks all [clear text requests]( unless a network configuration rule is added to exclude it specifically.

The packager falls into this category and therefore gets blocked; resulting in the app being unable to connect to it.

Domains/IPs for the config have been taken from [here](

This change only adds to DevSupport android resources - so won't affect builds without DevSupport, e.g. release builds.


[ANDROID] [DevSupport] add Network Security Config file to allow access to packager via cleartext requests in Android API 28 and above. (fixes #22375)
Pull Request resolved: #23105

Differential Revision: D13781516

Pulled By: cpojer

fbshipit-source-id: f7574f3e1b0fe6984efe1d0598ef631385c245bc
  • Loading branch information...
Salakar authored and facebook-github-bot committed Jan 23, 2019
1 parent 25f7b0e commit 3b0b7ce8c3c3679610c14ca72beb1a9dcf84d930
Showing with 8 additions and 0 deletions.
  1. +8 −0 ReactAndroid/src/main/res/devsupport/xml/network_security_config.xml
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">localhost</domain>
<domain includeSubdomains="false"></domain>
<domain includeSubdomains="false"></domain>

0 comments on commit 3b0b7ce

Please sign in to comment.
You can’t perform that action at this time.