1
0
Fork 0

Set user agent responsibly

This commit is contained in:
Sam Therapy 2023-10-10 00:25:05 +02:00
parent 534a098683
commit d9bf2380fe
Signed by: sam
GPG Key ID: 4D8B07C18F31ACBD
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ export default async function Search(
c.header("content-type", ContentType(type))
const img = await fetch(imageURL)
const img = await fetch(imageURL, {headers: {"User-Agent": "waifurudorde/1.0.0"}})
// Turn the image into an ArrayBuffer
.then((fetchRes) => {
return fetchRes?.arrayBuffer()