fix /r/ with empty relay url.

This commit is contained in:
fiatjaf
2024-07-28 21:50:59 -03:00
parent e1a6f2e0a9
commit b5a05ef2cd

View File

@@ -29,6 +29,11 @@ func renderRelayPage(w http.ResponseWriter, r *http.Request) {
isRSS = true
}
if len(hostname) < 3 {
http.Redirect(w, r, "/", http.StatusFound)
return
}
// relay metadata
info, _ := nip11.Fetch(r.Context(), hostname)
if info.Name == "" {