diff --git a/config.go b/config.go index 5a64c2a..05bd79f 100644 --- a/config.go +++ b/config.go @@ -45,6 +45,7 @@ type Config struct { BackupIntervalHours int `json:"backup_interval_hours"` BlastrRelays []string `json:"blastr_relays"` BlossomPath string `json:"blossom_path"` + BlossomPort int `json:"blossom_port"` } type AwsConfig struct { @@ -61,6 +62,7 @@ func loadConfig() Config { OwnerNpub: getEnv("OWNER_NPUB"), DBEngine: getEnvString("DB_ENGINE", "lmdb"), BlossomPath: getEnvString("BLOSSOM_PATH", "blossom"), + BlossomPort: getEnvInt("BLOSSOM_PORT", 3366), RelayURL: getEnv("RELAY_URL"), RelayPort: getEnvInt("RELAY_PORT", 3355), RelayBindAddress: getEnvString("RELAY_BIND_ADDRESS", "0.0.0.0"), diff --git a/init.go b/init.go index 80edb81..5549710 100644 --- a/init.go +++ b/init.go @@ -229,9 +229,9 @@ func initRelays() { outboxRelayLimits.ConnectionRateLimiterMaxTokens, ), ) - addr := fmt.Sprintf("%s:%d", config.RelayBindAddress, config.RelayPort) + addr := fmt.Sprintf("%s:%d", config.RelayBindAddress, config.BlossomPort) - bl := blossom.New(outboxRelay, addr+"/blossom") + bl := blossom.New(outboxRelay, addr) bl.Store = blossom.EventStoreBlobIndexWrapper{Store: outboxDB, ServiceURL: bl.ServiceURL} bl.StoreBlob = append(bl.StoreBlob, func(ctx context.Context, sha256 string, body []byte) error { if khatru.GetAuthed(ctx) != nPubToPubkey(config.OwnerNpub) {