private void putAdditionalHeadersOnRequest(HttpFetcherConfig additionalFetcherConfig, HttpGet httpGet) throws TikaException {
        if (!StringUtils.isBlank(httpFetcherConfig.getUserAgent())) {
            httpGet.setHeader(USER_AGENT, httpFetcherConfig.getUserAgent());
        }
        if (additionalFetcherConfig != null && additionalFetcherConfig.getHttpRequestHeaders() != null) {
            additionalFetcherConfig.getHttpRequestHeaders()
                    .getHeaders()
                    .forEach(httpGet::addHeader);
        }
        if (httpFetcherConfig.getHttpRequestHeaders() != null) {
            httpFetcherConfig.getHttpRequestHeaders()
                    .getHeaders()
                    .forEach(httpGet::addHeader);
        }
        if (jwtGenerator != null) {
            try {
                httpGet.setHeader("Authorization", "Bearer " + jwtGenerator.jwt());
            } catch (JOSEException e) {
                throw new TikaException("Could not generate JWT", e);
            }
        }
    }
If there were redirects, this captures the final URL visited
tika-pipes/tika-fetchers/tika-fetcher-http/src/main/java/org/apache/tika/pipes/fetcher/http/HttpFetcher.java