HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/orbi-individual/node_modules/next/dist/esm/shared/lib/router/utils/is-local-url.js
import { isAbsoluteUrl, getLocationOrigin } from "../../utils";
import { hasBasePath } from "../../../../client/has-base-path";
/**
 * Detects whether a given url is routable by the Next.js router (browser only).
 */ export function isLocalURL(url) {
    // prevent a hydration mismatch on href for url with anchor refs
    if (!isAbsoluteUrl(url)) return true;
    try {
        // absolute urls can be local if they are on the same origin
        const locationOrigin = getLocationOrigin();
        const resolved = new URL(url, locationOrigin);
        return resolved.origin === locationOrigin && hasBasePath(resolved.pathname);
    } catch (_) {
        return false;
    }
}

//# sourceMappingURL=is-local-url.js.map