feat: allow custom gravatar endpoints (#217)

* add custom gravatar registry env

* add default val

* use gravatar.com as default val
This commit is contained in:
梦清 2024-08-16 19:46:39 +08:00 committed by GitHub
parent aa54464a50
commit 742cceb463
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,8 @@ return function (Filter $filter) {
}
$hashed = md5(strtolower(trim($user->email)));
return "https://www.gravatar.com/avatar/$hashed";
$registry = env('GRAVATAR_REGISTRY', 'https://www.gravatar.com/avatar/');
return "$registry$hashed";
});
};