Initial Commit
This commit is contained in:
1 parent
37ff8e0a88
commit
b2f2d8b104
13 files changed
+378
-35
No files matched your search
@@ -1,4 +1,8 @@
|
||||
export function proxyImage(url: string | null | undefined): string | undefined {
|
||||
if (!url) return undefined;
|
||||
// Already a local path (e.g. cached media) — load it directly. The proxy
|
||||
// only knows how to handle Instagram's own CDN hosts, and a relative
|
||||
// path has no host at all, so it would otherwise get rejected.
|
||||
if (url.startsWith('/')) return url;
|
||||
return `/image-proxy?url=${encodeURIComponent(url)}`;
|
||||
}
|
||||
Reference in new issue
Block a user