langchain.js
    Preparing search index...
    • Check if two URLs have the same origin (scheme, host, port). Uses semantic URL parsing to prevent SSRF bypasses via URL variations.

      Parameters

      • url1: string

        First URL

      • url2: string

        Second URL

      Returns boolean

      true if both URLs have the same origin, false otherwise