Invalid AWN Request Fixer

This commit is contained in:
2025-01-29 18:06:50 -05:00
parent 3d3492a283
commit cd04beeec6
4 changed files with 107 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ import (
"golang.org/x/sys/unix"
"gitea.libretechconsulting.com/rmcguire/ambient-weather-local-exporter/pkg/ambient"
"gitea.libretechconsulting.com/rmcguire/ambient-weather-local-exporter/pkg/ambient/ambienthttp"
"gitea.libretechconsulting.com/rmcguire/ambient-weather-local-exporter/pkg/ambient/config"
)
@@ -46,6 +47,8 @@ func main() {
HandlerFunc: aw.GetAWNHandlerFunc(ctx),
},
},
CustomListener: ambienthttp.NewLFStrippingListener(ctx,
awConfig.HTTP.Listen), // Necessary to fix certain bad AWN firmware
HealthChecks: []srv.HealthCheckFunc{
// TODO: Implement
func(ctx context.Context) error {