From 38f21ab0c68890f977e4a4399538d754059de29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateo=20Guzm=C3=A1n?= Date: Sun, 24 Nov 2024 15:34:09 +0100 Subject: [PATCH] fix(image): cache control header is being overwritten by the rest of the headers --- .../facebook/react/modules/fresco/ReactOkHttpNetworkFetcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/ReactOkHttpNetworkFetcher.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/ReactOkHttpNetworkFetcher.kt index 2e0bec6a11948f..6eddbb753c15b3 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/ReactOkHttpNetworkFetcher.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/ReactOkHttpNetworkFetcher.kt @@ -60,9 +60,9 @@ internal class ReactOkHttpNetworkFetcher(private val okHttpClient: OkHttpClient) val headers = OkHttpCompat.getHeadersFromMap(requestHeaders) val request = Request.Builder() + .headers(headers) .cacheControl(cacheControlBuilder.build()) .url(uri.toString()) - .headers(headers) .get() .build() fetchWithRequest(fetchState, callback, request)