'Chrome refuses redirect download even though the redirect is via https

Recently customers complained that they were not able to download their purchased files from my server. Turns out that Chrome is silently refusing the download, as the server was configured to redirect via unseecure http. Yesterday I changed the redirect on the server to use https, but Chrome still shows the same error. In the Chrome console window I get the following message:

account_history_info.php:1 Mixed Content: The site at 'https://www.pipeloops.com/' was loaded over a secure connection, but the file at 'https://www.pipeloops.com//pub/.vqnwtdrkytmutwwgjm/Pipeloops_Laeken_Small_Licenced.HW5.CompPkg.Hauptwerk.rar' was redirected through an insecure connection. This file should be served over HTTPS. This download has been blocked. See https://blog.chromium.org/2020/02/protecting-users-from-insecure.html for more details.

Any ideas why Chrome is still refusing the download even though the file IS served via https???

The redirect headers look like this:

header("Expires: Thu, 1 Jun 2062 00:00:00 GMT");
  header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
  header("Cache-Control: no-cache, must-revalidate");
  header("Pragma: no-cache");
  header("Content-Type: Application/octet-stream");
  header("Content-disposition: attachment; filename=" . $downloads['orders_products_filename']);
  header("Location: https://....   (filename as can be seen above in the Chrome console output)

I have full control over the headers, but I simply don't know what is causing the problem.

Thanks! Reiner



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source