From 9c38e33f07801ced3a1cb6ae9d408f32956005de Mon Sep 17 00:00:00 2001 From: w3K Date: Sat, 28 May 2022 19:14:06 -0400 Subject: [PATCH] Fix 404 errors on updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before change you get these errors constantly on any host ip update: {"time":"2022-05-09T19:03:38.40895553Z","id":"","remote_ip":"69.1.2.3","host":"ddns.domain.com","method":"GET","uri":"/nic/update?system=dyndns&hostname=test1.ddns.domain.com&myip=&wildcard=OFF&mx=NO&backmx=NO&offline=NO","user_agent":"Hikvision-dvrdvs-1.0.0","status":404,"error":"code=404, message=Not Found","latency":895808,"latency_human":"895.808µs","bytes_in":0,"bytes_out":24} {"time":"2022-05-09T19:03:40.496361052Z","id":"","remote_ip":"69.3.2.1","host":"ddns.domain.com","method":"GET","uri":"/nic/update?system=dyndns&hostname=test2.ddns.domain.com&myip=&wildcard=OFF&mx=NO&backmx=NO&offline=NO","user_agent":"Hikvision-dvrdvs-1.0.0","status":404,"error":"code=404, message=Not Found","latency":796442,"latency_human":"796.442µs","bytes_in":0,"bytes_out":24} {"time":"2022-05-09T19:03:45.375560893Z","id":"","remote_ip":"69.4.4.4","host":"ddns.domain.com","method":"GET","uri":"/nic/update?system=dyndns&hostname=test3.ddns.domain.com&myip=&wildcard=OFF&mx=NO&backmx=NO&offline=NO","user_agent":"Hikvision-dvrdvs-1.0.0","status":404,"error":"code=404, message=Not Found","latency":774547,"latency_human":"774.547µs","bytes_in":0,"bytes_out":24} After change... hosts are updated... no issues. --- dyndns/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyndns/main.go b/dyndns/main.go index 610ff3a..3ad8416 100644 --- a/dyndns/main.go +++ b/dyndns/main.go @@ -98,7 +98,7 @@ func main() { updateRoute.GET("", h.UpdateIP) nicRoute := e.Group("/nic") nicRoute.Use(middleware.BasicAuth(h.AuthenticateUpdate)) - updateRoute.GET("/update", h.UpdateIP) + nicRoute.GET("/update", h.UpdateIP) v2Route := e.Group("/v2") v2Route.Use(middleware.BasicAuth(h.AuthenticateUpdate)) v2Route.GET("/update", h.UpdateIP)