diff --git a/profile.templ b/profile.templ
index a6ef699..0273053 100644
--- a/profile.templ
+++ b/profile.templ
@@ -143,7 +143,7 @@ templ profileTemplate(params ProfilePageParams) {
{ params.Metadata.Npub() }
if params.Metadata.NIP05 != "" {
-
+
NIP-05 Address
{ nip05.NormalizeIdentifier(params.Metadata.NIP05) }
diff --git a/render_profile.go b/render_profile.go
index 0154c42..150a808 100644
--- a/render_profile.go
+++ b/render_profile.go
@@ -6,6 +6,7 @@ import (
"html/template"
"net/http"
"strings"
+ "time"
)
func renderProfile(ctx context.Context, r *http.Request, w http.ResponseWriter, code string) {
@@ -117,6 +118,10 @@ func renderProfile(ctx context.Context, r *http.Request, w http.ResponseWriter,
),
}
+ // give this global context a timeout because it may used inside the template to validate the nip05 address
+ ctx, cancel := context.WithTimeout(ctx, time.Second*3)
+ defer cancel()
+
if isEmbed {
err = embeddedProfileTemplate(params).Render(ctx, w)
} else {