Skip to content

Commit

Permalink
Allow HTTP traffic on imgur.com domain to imgur sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Landice Fu committed Feb 10, 2020
1 parent 0647c41 commit b2a361a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
7 changes: 5 additions & 2 deletions samples/flickr/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bumptech.glide.samples.flickr">
xmlns:tools="http://schemas.android.com/tools"
package="com.bumptech.glide.samples.flickr">

<uses-permission android:name="android.permission.INTERNET"/>
<!--
Expand All @@ -13,7 +14,9 @@
android:label="@string/app_name"
android:icon="@android:drawable/sym_def_app_icon"
android:allowBackup="false"
android:theme="@style/Theme.AppCompat">
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/Theme.AppCompat"
tools:targetApi="n">

<activity
android:name=".FlickrSearchActivity"
Expand Down
6 changes: 6 additions & 0 deletions samples/flickr/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">staticflickr.com</domain>
</domain-config>
</network-security-config>
5 changes: 4 additions & 1 deletion samples/imgur/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.bumptech.glide.samples.imgur">
<uses-permission android:name="android.permission.INTERNET" />
<!--
Expand All @@ -14,7 +15,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:name="com.bumptech.glide.samples.imgur.ImgurApplication">
android:networkSecurityConfig="@xml/network_security_config"
android:name="com.bumptech.glide.samples.imgur.ImgurApplication"
tools:targetApi="n">
<activity android:name="com.bumptech.glide.samples.imgur.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down
6 changes: 6 additions & 0 deletions samples/imgur/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">imgur.com</domain>
</domain-config>
</network-security-config>

0 comments on commit b2a361a

Please sign in to comment.