mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
add simple webhook feature for peer, interface and user events (#398)
This commit is contained in:
@@ -62,6 +62,8 @@ type Config struct {
|
||||
Database DatabaseConfig `yaml:"database"`
|
||||
|
||||
Web WebConfig `yaml:"web"`
|
||||
|
||||
Webhook WebhookConfig `yaml:"webhook"`
|
||||
}
|
||||
|
||||
// LogStartupValues logs the startup values of the configuration in debug level
|
||||
@@ -158,6 +160,10 @@ func defaultConfig() *Config {
|
||||
LinkOnly: false,
|
||||
}
|
||||
|
||||
cfg.Webhook.Url = "" // no webhook by default
|
||||
cfg.Webhook.Authentication = ""
|
||||
cfg.Webhook.Timeout = 10 * time.Second
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user