Skip to content

Add the GITHUB_PROXY_PREFIX environment variable#1091

Merged
taylorotwell merged 2 commits intolaravel:2.xfrom
sanzhangshitou:2.x
Jan 22, 2026
Merged

Add the GITHUB_PROXY_PREFIX environment variable#1091
taylorotwell merged 2 commits intolaravel:2.xfrom
sanzhangshitou:2.x

Conversation

@sanzhangshitou
Copy link
Contributor

GITHUB_PROXY_PREFIX environment variable

Add the GITHUB_PROXY_PREFIX environment variable to optimize the issue of failure or slow speed during Docker builds within China.

$githubProxyPrefix = env('GITHUB_PROXY_PREFIX', '');

$response = Http::accept('application/vnd.github+json')
    ->withHeaders(['X-GitHub-Api-Version' => '2022-11-28'])
    ->get($githubProxyPrefix.'https://api.github.com/repos/php/frankenphp/releases/latest')
    ->throw(fn () => $this->components->error('Failed to download FrankenPHP.'));
    
(new Client)->get(
  $githubProxyPrefix.$asset['browser_download_url'],
  );

张磊 and others added 2 commits January 22, 2026 19:16
@taylorotwell taylorotwell merged commit c343716 into laravel:2.x Jan 22, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants