fix(link): force cache url fetching

This commit is contained in:
Aslam H
2024-09-10 12:49:32 +07:00
parent 5466965fa6
commit 4ddb64addd

View File

@@ -118,7 +118,7 @@ export const LinkForm: React.FC<LinkFormProps> = ({
const fetchMetadata = async (url: string) => {
setIsFetching(true)
try {
const res = await fetch(`/api/metadata?url=${encodeURIComponent(url)}`, { cache: "no-cache" })
const res = await fetch(`/api/metadata?url=${encodeURIComponent(url)}`, { cache: "force-cache" })
const data = await res.json()
setUrlFetched(data.url)
form.setValue("url", data.url, {