mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-22 08:18:33 +02:00
fix(link): force cache url fetching
This commit is contained in:
@@ -118,7 +118,7 @@ export const LinkForm: React.FC<LinkFormProps> = ({
|
|||||||
const fetchMetadata = async (url: string) => {
|
const fetchMetadata = async (url: string) => {
|
||||||
setIsFetching(true)
|
setIsFetching(true)
|
||||||
try {
|
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()
|
const data = await res.json()
|
||||||
setUrlFetched(data.url)
|
setUrlFetched(data.url)
|
||||||
form.setValue("url", data.url, {
|
form.setValue("url", data.url, {
|
||||||
|
|||||||
Reference in New Issue
Block a user