mirror of
https://github.com/believethehype/nostdress.git
synced 2026-07-24 14:38:10 -07:00
allow tor proxy url to be configured.
fixes https://github.com/fiatjaf/makeinvoice/issues/2
This commit is contained in:
@@ -24,6 +24,8 @@ type Settings struct {
|
||||
SiteOwnerName string `envconfig:"SITE_OWNER_NAME" required:"true"`
|
||||
SiteOwnerURL string `envconfig:"SITE_OWNER_URL" required:"true"`
|
||||
SiteName string `envconfig:"SITE_NAME" required:"true"`
|
||||
|
||||
TorProxyURL string `envconfig:"TOR_PROXY_URL"`
|
||||
}
|
||||
|
||||
var s Settings
|
||||
@@ -48,6 +50,10 @@ func main() {
|
||||
|
||||
s.Domain = strings.ToLower(s.Domain)
|
||||
|
||||
if s.TorProxyURL != "" {
|
||||
makeinvoice.TorProxyURL = s.TorProxyURL
|
||||
}
|
||||
|
||||
db, err = pebble.Open(s.Domain, nil)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Str("path", s.Domain).Msg("failed to open db.")
|
||||
|
||||
Reference in New Issue
Block a user