Add support for alternative download domain #3

Merged
Francesco Siddi merged 4 commits from cdn-support-for-downloads into develop 2024-05-30 09:22:56 +02:00
Showing only changes of commit 94ce5677f8 - Show all commits

View File

@ -291,7 +291,8 @@ class BuildsRenderer {
$protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http"); $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http");
} }
$host_id = getHostId(); // Try to use the CDN host, otherwise use existing host
$host_id = getenv('HOST_CDN') ?: getHostId();
$uri = $protocol . "://$host_id" . "$request_uri"; $uri = $protocol . "://$host_id" . "$request_uri";