mirror of
https://github.com/aljazceru/haven.git
synced 2025-12-18 22:24:22 +01:00
add blossom url
This commit is contained in:
@@ -45,6 +45,7 @@ type Config struct {
|
|||||||
BackupIntervalHours int `json:"backup_interval_hours"`
|
BackupIntervalHours int `json:"backup_interval_hours"`
|
||||||
BlastrRelays []string `json:"blastr_relays"`
|
BlastrRelays []string `json:"blastr_relays"`
|
||||||
BlossomPath string `json:"blossom_path"`
|
BlossomPath string `json:"blossom_path"`
|
||||||
|
BlossomURL string `json:"blossom_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AwsConfig struct {
|
type AwsConfig struct {
|
||||||
@@ -61,6 +62,7 @@ func loadConfig() Config {
|
|||||||
OwnerNpub: getEnv("OWNER_NPUB"),
|
OwnerNpub: getEnv("OWNER_NPUB"),
|
||||||
DBEngine: getEnvString("DB_ENGINE", "lmdb"),
|
DBEngine: getEnvString("DB_ENGINE", "lmdb"),
|
||||||
BlossomPath: getEnvString("BLOSSOM_PATH", "blossom"),
|
BlossomPath: getEnvString("BLOSSOM_PATH", "blossom"),
|
||||||
|
BlossomURL: getEnvString("BLOSSOM_URL", "http://localhost:3355"),
|
||||||
RelayURL: getEnv("RELAY_URL"),
|
RelayURL: getEnv("RELAY_URL"),
|
||||||
RelayPort: getEnvInt("RELAY_PORT", 3355),
|
RelayPort: getEnvInt("RELAY_PORT", 3355),
|
||||||
RelayBindAddress: getEnvString("RELAY_BIND_ADDRESS", "0.0.0.0"),
|
RelayBindAddress: getEnvString("RELAY_BIND_ADDRESS", "0.0.0.0"),
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -287,9 +287,7 @@ func makeNewRelay(relayType string, w http.ResponseWriter, r *http.Request) *kha
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
addr := fmt.Sprintf("%s:%d", config.RelayBindAddress, config.RelayPort)
|
bl := blossom.New(outboxRelay, config.BlossomURL)
|
||||||
|
|
||||||
bl := blossom.New(outboxRelay, addr)
|
|
||||||
bl.Store = blossom.EventStoreBlobIndexWrapper{Store: outboxDB, ServiceURL: bl.ServiceURL}
|
bl.Store = blossom.EventStoreBlobIndexWrapper{Store: outboxDB, ServiceURL: bl.ServiceURL}
|
||||||
bl.StoreBlob = append(bl.StoreBlob, func(ctx context.Context, sha256 string, body []byte) error {
|
bl.StoreBlob = append(bl.StoreBlob, func(ctx context.Context, sha256 string, body []byte) error {
|
||||||
// if khatru.GetAuthed(ctx) != nPubToPubkey(config.OwnerNpub) {
|
// if khatru.GetAuthed(ctx) != nPubToPubkey(config.OwnerNpub) {
|
||||||
|
|||||||
Reference in New Issue
Block a user