diff --git a/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java b/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java index d81dd3eae..5e8d5036d 100644 --- a/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java +++ b/app/src/main/java/io/legado/app/help/OkhttpCacheDataSource.java @@ -170,6 +170,13 @@ public final class OkhttpCacheDataSource implements DataSource { return this; } + public Factory setDefaultRequestProperties(Map defaultRequestProperties){ + if (this.upstreamDataSourceFactory != null) { + this.upstreamDataSourceFactory.setDefaultRequestProperties(defaultRequestProperties); + } + return this; + } + /** * Sets an optional {@link PriorityTaskManager} to use when requesting data from upstream. *