diff options
| author | bndw <ben@bdw.to> | 2026-03-07 18:34:25 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-03-07 18:34:25 -0800 |
| commit | 4522797a0cf378cc44485ed77a01dee9643b6ebe (patch) | |
| tree | faa7a1970885635df0cc49cbc4a1aef6fcbea5fa /cmd | |
| parent | 5195d8031b7930069ba5441a6cd1e7a59c21c546 (diff) | |
Make allowed event kinds configurable
Replaces hardcoded kind allowlist in isAllowedKind with a configurable
allowed_kinds list in relay config. Empty list allows all kinds. Default
matches previous hardcoded list. Wired through SetAllowedKinds on the
handler.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/relay/main.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/relay/main.go b/cmd/relay/main.go index 78ee469..601b2e8 100644 --- a/cmd/relay/main.go +++ b/cmd/relay/main.go | |||
| @@ -123,6 +123,7 @@ func main() { | |||
| 123 | Contact: cfg.Relay.Contact, | 123 | Contact: cfg.Relay.Contact, |
| 124 | Icon: cfg.Relay.Icon, | 124 | Icon: cfg.Relay.Icon, |
| 125 | }) | 125 | }) |
| 126 | wsHandler.SetAllowedKinds(cfg.Relay.AllowedKinds) | ||
| 126 | 127 | ||
| 127 | if cfg.Auth.Read.Enabled || cfg.Auth.Write.Enabled { | 128 | if cfg.Auth.Read.Enabled || cfg.Auth.Write.Enabled { |
| 128 | wsHandler.SetAuth(store) | 129 | wsHandler.SetAuth(store) |
