Swap out corsproxy.io for our custom proxy

This commit is contained in:
Alex Gleason committed 2025-09-22 06:32:49 -05:00
1 parent 92376d58b8
commit 6d6f18a877
6 files changed
+35 -25

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import UriTemplate from 'uri-templates';
export function proxyUrl(template: string, url: string | URL): string {
const u = new URL(url);
return UriTemplate(template).fill({
href: u.href,
origin: u.origin,
protocol: u.protocol,
username: u.username,
password: u.password,
host: u.host,
hostname: u.hostname,
port: u.port,
pathname: u.pathname,
hash: u.hash,
search: u.search,
});
}