Fix some specs, improve config

Allow empty string to unset nostr relay URL config
This commit is contained in:
2024-08-14 13:36:15 +02:00
parent 3284bbf6ca
commit b91d90d75c
3 changed files with 9 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ class WellKnownController < ApplicationController
def nostr
http_status :unprocessable_entity and return if params[:name].blank?
domain = request.headers["X-Forwarded-Host"].presence || Setting.primary_domain
relay_url = Setting.nostr_relay_url
relay_url = Setting.nostr_relay_url.presence
if params[:name] == "_"
# pubkey for the primary domain without a username (e.g. kosmos.org)