https://github.com/GetDKAN/dkan2/blob/master/modules/dkan_common/src/UrlHostTokenResolver.php#L18 replaces the hostname, but not the protocol. This means that files uploaded over http will be served over http and the same for https, even if the host serving the files is using the opposite protocol. This can cause insecure links on https servers (that have moved from http) or broken links if a server used to support https but no longer does.
https://github.com/GetDKAN/dkan2/blob/master/modules/dkan_common/src/UrlHostTokenResolver.php#L18 replaces the hostname, but not the protocol. This means that files uploaded over http will be served over http and the same for https, even if the host serving the files is using the opposite protocol. This can cause insecure links on https servers (that have moved from http) or broken links if a server used to support https but no longer does.