feat: make Dicebear API domain configurable

This commit is contained in:
Yarmo Mackenbach 2023-10-04 14:49:53 +02:00
parent 96983a67df
commit 5200ad3611
No known key found for this signature in database
GPG key ID: 3C57D093219103A3
2 changed files with 6 additions and 1 deletions

View file

@ -223,7 +223,8 @@ const processAspProfile = async (/** @type {import('doipjs').Profile */ profile)
// Overwrite avatarUrl
// TODO: don't overwrite avatarUrl once it's fully supported
profile.personas[profile.primaryPersonaIndex].avatarUrl = `https://api.dicebear.com/6.x/shapes/svg?seed=${profile.publicKey.fingerprint}&size=128`
profile.personas[profile.primaryPersonaIndex].avatarUrl =
`https://${process.env.DICEBEAR_API_HOSTNAME || "api.dicebear.com" }/7.x/shapes/svg?seed=${profile.publicKey.fingerprint}&size=128`
return profile
}

View file

@ -16,6 +16,10 @@
# To host a Keyoxide Proxy server, refer to https://docs.keyoxide.org/self-hosting/
#PROXY_HOSTNAME=
# Domain for Dicebear API server
# Defaults to: api.dicebear.com
#DICEBEAR_API_HOSTNAME=
# Tor Onion URL
# The full http:// onion url to add as an 'Onion-Location' header
#ONION_URL=