Updated Vercel OG to latest + added fallback img (#8057)

* Updated Vercel OG to latest so we can add a fallback image — and added this fallback image to the screenshot og image.

* Updated vercel/og in web package as well.

* Updated yarn.lock with auth dependencies

* Upgraded next to latest to fix next image throwing weird bad response errors.

* Revert "Upgraded next to latest to fix next image throwing weird bad response errors."

This reverts commit 4e9d97dbe5ebe682b905ce41f88197915e19647d.

* Added content type headers to og image api response.

---------

Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
Jeroen ReumkensandAlex van Andel authored and GitHub committed 2023-04-03 16:06:02 +02:00
1 parent db4449d849
commit 99dba73d0b
4 files changed
+103 -15

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@
"@types/turndown": "^5.0.1",
"@vercel/edge-config": "^0.1.1",
"@vercel/edge-functions-ui": "^0.2.1",
"@vercel/og": "^0.0.21",
"@vercel/og": "^0.5.0",
"accept-language-parser": "^1.5.0",
"async": "^3.2.4",
"bcryptjs": "^2.4.3",
+3 -3
View File
@@ -88,7 +88,7 @@ export default async function handler(req: NextApiRequest) {
ogConfig
) as { body: Buffer };
return new Response(img.body, { status: 200 });
return new Response(img.body, { status: 200, headers: { "Content-Type": "image/png" } });
}
case "app": {
const { name, description, slug } = appSchema.parse({
@@ -101,7 +101,7 @@ export default async function handler(req: NextApiRequest) {
body: Buffer;
};
return new Response(img.body, { status: 200 });
return new Response(img.body, { status: 200, headers: { "Content-Type": "image/png" } });
}
case "generic": {
@@ -115,7 +115,7 @@ export default async function handler(req: NextApiRequest) {
body: Buffer;
};
return new Response(img.body, { status: 200 });
return new Response(img.body, { status: 200, headers: { "Content-Type": "image/png" } });
}
default: