mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 23:04:21 +01:00
Trim cache key prefixes and the relay protocols, before using them
This commit is contained in:
@@ -55,10 +55,10 @@ func renderArchive(w http.ResponseWriter, r *http.Request) {
|
|||||||
data := []string{}
|
data := []string{}
|
||||||
for i := 0; i < len(keys); i++ {
|
for i := 0; i < len(keys); i++ {
|
||||||
if area == "npubs-archive" {
|
if area == "npubs-archive" {
|
||||||
npub, _ := nip19.EncodePublicKey(keys[i])
|
npub, _ := nip19.EncodePublicKey(keys[i][3:])
|
||||||
data = append(data, npub)
|
data = append(data, npub)
|
||||||
} else {
|
} else {
|
||||||
data = append(data, keys[i])
|
data = append(data, trimProtocol(keys[i][3:]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user