@maschinenlesbar.org/oparl-cli
    Preparing search index...

    Function resolveLink

    • Resolve a link the server handed out (a pagination next link, a Body's list URL, a redirect Location) against the URL it came from, and decide whether to follow it. Links stay on the same host: another hostname or port is refused. An http: link on the same host as an https: page is upgraded to https: — several servers publish http:// ids while serving https — and a downgrade is never followed. A refusal quotes the link with scrub applied to it as sent, before it is resolved (resolving percent-encodes what is left in a new spelling): the engine passes its scrub of the credential headers' secrets, so a link that echoes one never shows it.

      Parameters

      • from: string
      • link: string
      • scrub: (text: string) => string = ...

      Returns string