Skip to content

Commit

Permalink
remove previous optimization that auto-added 'https://' prefix to sea…
Browse files Browse the repository at this point in the history
…rch queries, which resulted in 'urn:' resources not being searchable

also caused unintuitive behavior, where 'ht' would show no results while 'http' would, now fixed
  • Loading branch information
ikreymer committed Jun 18, 2024
1 parent 9cfeca3 commit 0fdea66
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/url-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ class URLResources extends LitElement {
}

this.loading = true;
let url = this.urlSearchType !== "contains" ? this.query : "";
const url = this.urlSearchType !== "contains" ? this.query : "";
const prefix = url && this.urlSearchType === "prefix" ? 1 : 0;

// optimization: if not starting with http, likely won't have a match here, so just add https://
if (url && !url.startsWith("http")) {
url = "https://" + url;
}
// optimization: if not starting with http or urn:, likely won't have a match here, so just add https://
// if (url && !url.startsWith("http") && !url.startsWith("urn:")) {
// url = "https://" + url;
// }

const mime = this.currMime;

Expand Down

0 comments on commit 0fdea66

Please sign in to comment.