Allow using without a CORS proxy (#1011)

CORS can be disabled, or the server can be configured to send CORS headers. So, it would be useful to be able to skip the CORS proxy.
This commit is contained in:
teknixstuff4 2026-04-24 17:48:05 +01:00 • committed by GitHub
parent eac866a505
commit b4ec1711c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,5 +11,8 @@ export function normalizeCorsProxyUrl(url?: string): string {
}
export function toProxiedUrl(url: string, corsProxyUrl = CORS_PROXY): string {
if (corsProxyUrl == "none") {
return url;
}
return `${normalizeCorsProxyUrl(corsProxyUrl)}?url=${encodeURIComponent(url)}`;
}