relay pages at /r/... and nip05 pages at /p/...

This commit is contained in:
fiatjaf
2023-07-27 13:00:52 -03:00
parent bb24a43eb2
commit 4e587cf186
4 changed files with 52 additions and 41 deletions

View File

@@ -13,7 +13,7 @@ import (
func renderRelayPage(w http.ResponseWriter, r *http.Request) {
code := r.URL.Path[1:]
hostname := code
hostname := code[2:]
typ := "relay"
if strings.HasSuffix(hostname, ".xml") {
hostname = code[:len(hostname)-4]