//#region src/gui/shouldSignUrl.ts
/**
* Determines whether a URL should be signed before fetching.
*
* Signing is skipped for:
* - Local vite plugin endpoints (/@ef-*)
* - Same-origin URLs (local dev server routes like /api/v1/transcode/*)
*
* @param url - The URL to evaluate
* @param currentOrigin - The current page origin (window.location.origin)
*/
function shouldSignUrl(url, currentOrigin) {
	if (url.startsWith("/@ef-")) return false;
	try {
		return new URL(url, currentOrigin).origin !== currentOrigin;
	} catch {
		return true;
	}
}

//#endregion
export { shouldSignUrl };
//# sourceMappingURL=shouldSignUrl.js.map