From 4e584f8de05dad7aff63b3feb17b5f848d4e02bf Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Sat, 23 Mar 2024 17:43:29 +0100 Subject: [PATCH] add ACAO Signed-off-by: Sam Therapy --- src/helpers/search.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/search.ts b/src/helpers/search.ts index c97c566..7617e9d 100644 --- a/src/helpers/search.ts +++ b/src/helpers/search.ts @@ -21,12 +21,13 @@ export default async function Search( const imageURL = (posts as booru.SearchResults)[0]?.fileUrl as string - const type = imageURL?.split(".")?.pop() as string + const type = imageURL?.split(".")?.pop() if (type == null) { return c.json({ error: "No results found" }, 404) } c.header("content-type", ContentType(type)) + c.header("Access-Control-Allow-Origin", "*") const img = await fetch(imageURL, { headers: {