Class HstsResolver

java.lang.Object
com.norconex.collector.http.fetch.util.HstsResolver

public final class HstsResolver extends Object

Class handling HSTS support for servers supporting it. Upon encountering the first secure URL from a site, it caches whether the URL root domain returns an HTTP response containing a "Strict-Transport-Security" entry and if it includes sub-domains. Any non secure URL on that same site will be converted to https if requested by the HSTS server directive (if any).

To always convert "http" to "https" regardless of a site support for HSTS, you should rely on GenericURLNormalizer.Normalization.secureScheme instead.

Since:
3.0.0
Author:
Pascal Essiembre
  • Method Details

    • resolve

      public static void resolve(org.apache.http.client.HttpClient httpClient, HttpDocInfo docInfo)