MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / stripURLForReferrer

Function stripURLForReferrer

out/cli.cjs:50705–50718  ·  view source on GitHub ↗
(url2, originOnly)

Source from the content-addressed store, hash-verified

50703 * request’s current URL is not a potentially trustworthy URL,
50704 * then return no referrer.
50705 * 2. Return referrerOrigin
50706 */
50707 default:
50708 return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin;
50709 }
50710 }
50711 function stripURLForReferrer(url2, originOnly) {
50712 assert2(url2 instanceof URL);
50713 if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") {
50714 return "no-referrer";
50715 }
50716 url2.username = "";
50717 url2.password = "";
50718 url2.hash = "";
50719 if (originOnly) {
50720 url2.pathname = "";
50721 url2.search = "";

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…