screenshots; apiBase

This commit is contained in:
Egor Aristov 2025-02-05 23:05:46 +03:00
parent 2e6cde7a8e
commit d7b644c491
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F

View File

@ -37,7 +37,7 @@ export async function encodeUrl(specs: Specs): Promise<string> {
} }
export function getScreenshotUrl(url: string): string { export function getScreenshotUrl(url: string): string {
return `${apiBase}${screenshotEndpoint}?url=${url}`; return `${apiBase}${screenshotEndpoint}?url=${encodeURIComponent(url)}`;
} }
function b64encode(buf: Uint8Array): string { function b64encode(buf: Uint8Array): string {