Use HTTPS for Google Books Images

The API for Google Books will return HTTP image URLs when matiching any
books using it as a search provider. In a secure environment, this
causes browser warnings.

All Google image links support HTTPS and we can safely switch to HTTOS
to avoid these warnings.
This commit is contained in:
Lars Kiesow 2022-12-18 00:18:11 +01:00
parent 10295b000a
commit b47ce4fb24
No known key found for this signature in database
GPG Key ID: 5DAFE8D9C823CE73

View File

@ -20,7 +20,8 @@ class GoogleBooks {
let cover = null
// Selects the largest cover assuming the largest is the last key in the object
if (imageLinks && Object.keys(imageLinks).length) {
cover = imageLinks[Object.keys(imageLinks).pop()] || null
cover = imageLinks[Object.keys(imageLinks).pop()]
cover = cover?.replace(/^http:/, 'https:') || null
}
return {