allow publishing events from allowed pubkeys without auth, if env variable is set

This commit is contained in:
Danny Morabito 2025-08-06 18:40:17 +02:00
parent 3367cb929b
commit 22a4fe069f
Signed by: dannym
GPG key ID: 7CC8056A5A04557E
2 changed files with 13 additions and 5 deletions

View file

@ -1,7 +1,8 @@
import { main } from "./src/main.ts";
let allowUnauthedPublish = Boolean(process.env.ALLOW_UNAUTHED_PUBLISH) || false;
let relay = process.env.RELAY_URL ?? Bun.argv[Bun.argv.length - 1];
if (!relay?.startsWith("wss://") && !relay?.startsWith("ws://"))
relay = "wss://relay.arx-ccn.com";
main(relay)
main(relay, allowUnauthedPublish)