-
- All Implemented Interfaces:
-
coil3.intercept.Interceptor
public final class CDNImageInterceptor implements InterceptorA Coil Interceptor that intercepts image requests and applies CDN transformations.
The interceptor calls CDN.imageRequest to obtain a potentially modified URL and additional headers. CDN headers take precedence over any headers already present on the request (e.g. from io.getstream.chat.android.ui.common.helper.ImageHeadersProvider), overriding them for the same key.
Only HTTP/HTTPS URLs are intercepted; local resources, content URIs, etc. pass through unchanged.
The CDN instance is resolved lazily via cdn on each request, so the interceptor is safe to install even before ChatClient is initialized (e.g. Compose previews, VRT tests). When cdn returns
nullthe request passes through unchanged.
-
-
Constructor Summary
Constructors Constructor Description CDNImageInterceptor(Function0<CDN> cdn)
-