datarhei-dragonfork-core/config
Zac Gaetano 2d29dc9c4a
Some checks failed
tests / build (push) Failing after 3s
fix(config): preserve WebRTC section in Config.Clone()
Config.Clone() copied every top-level Data section except WebRTC.
Because api.go receives a clone (not the original), cfg.WebRTC.Enable
was always the zero value at runtime, the subsystem was skipped, and
the WHEP route was never mounted — regardless of CORE_WEBRTC_ENABLE.

Caught on the first live M2 TrueNAS deploy: env said enable=true,
container listened fine, but /api/v3/whep/:id returned Echo's default
JSON 404 (from router) instead of the handler's plain-text
'webrtc: stream not found' (which it would return for an unknown id).

- Add data.WebRTC = d.WebRTC in the struct-copy block.
- Deep-copy NAT1To1IPs alongside the other []string sections.
- Regression test TestConfigCopyWebRTC covers both.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 15:26:11 -04:00
..
copy Fix proper version handling for uploading a new config 2022-10-10 16:19:45 +02:00
store Fix default search paths for config file 2023-09-07 16:23:15 +02:00
v1 Fix tests 2023-02-21 12:57:33 +01:00
v2 Fix tests 2023-02-21 12:57:33 +01:00
value Fix parsing S3 storage definition from environment variable 2023-04-13 12:19:20 +02:00
vars Add tests 2023-01-24 13:40:36 +01:00
config.go fix(config): preserve WebRTC section in Config.Clone() 2026-04-17 15:26:11 -04:00
config_test.go fix(config): preserve WebRTC section in Config.Clone() 2026-04-17 15:26:11 -04:00
data.go feat(webrtc): add app/webrtc subsystem + lifecycle hooks 2026-04-17 10:02:00 -04:00
data_test.go Use abstract filesystem for stores 2023-02-01 16:09:20 +01:00