fix(og-image.php): set default user agent

This commit is contained in:
Cory Dransfeldt 2025-05-15 10:08:06 -07:00
parent 4f15e88074
commit 8fb3e761b3
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] ?? 'coryd-bot/1.0');
$image = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);