We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 654d140 commit b0dff7dCopy full SHA for b0dff7d
1 file changed
pages/api/social-image.tsx
@@ -1,4 +1,3 @@
1
-import ky from 'ky'
2
import { type NextApiRequest, type NextApiResponse } from 'next'
3
import { ImageResponse } from 'next/og'
4
import { type PageBlock } from 'notion-types'
@@ -277,8 +276,8 @@ async function isUrlReachable(
277
276
}
278
279
try {
280
- await ky.head(url)
281
- return true
+ const res = await fetch(url, { method: 'HEAD' })
+ return res.ok
282
} catch {
283
return false
284
0 commit comments