Fix returning setup page when event can't be found for pubkey

This commit is contained in:
hzrd149 2025-06-09 18:17:32 -05:00
parent 7fa6a79d3b
commit 1473eee4fd
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"nsite-gateway": patch
---
Fix returning setup page when event can't be found for pubkey

View File

@ -63,7 +63,7 @@ app.use(async (ctx, next) => {
app.use(async (ctx, next) => { app.use(async (ctx, next) => {
let pubkey = await resolvePubkeyFromHostname(ctx.hostname); let pubkey = await resolvePubkeyFromHostname(ctx.hostname);
let fallthrough = true; let fallthrough = false;
if (!pubkey && NSITE_HOMEPAGE && (!PUBLIC_DOMAIN || ctx.hostname === PUBLIC_DOMAIN)) { if (!pubkey && NSITE_HOMEPAGE && (!PUBLIC_DOMAIN || ctx.hostname === PUBLIC_DOMAIN)) {
const parsed = nip19.decode(NSITE_HOMEPAGE); const parsed = nip19.decode(NSITE_HOMEPAGE);
// TODO: use the relays in the nprofile // TODO: use the relays in the nprofile