Added dyndns compatible api
This commit is contained in:
parent
ef96496474
commit
2eebbcda9c
@ -93,3 +93,7 @@ or
|
|||||||
http://username:password@dyndns.example.com:8080/update?hostname=blog.dyndns.example.com
|
http://username:password@dyndns.example.com:8080/update?hostname=blog.dyndns.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The handler will also listen on:
|
||||||
|
* /nic/update
|
||||||
|
* /v2/update
|
||||||
|
* /v3/update
|
||||||
|
|||||||
@ -60,7 +60,12 @@ func main() {
|
|||||||
e.POST("/hosts/add", h.CreateHost)
|
e.POST("/hosts/add", h.CreateHost)
|
||||||
e.POST("/hosts/edit/:id", h.UpdateHost)
|
e.POST("/hosts/edit/:id", h.UpdateHost)
|
||||||
e.GET("/hosts/delete/:id", h.DeleteHost)
|
e.GET("/hosts/delete/:id", h.DeleteHost)
|
||||||
|
|
||||||
|
// dyndns compatible api
|
||||||
e.GET("/update", h.UpdateIP)
|
e.GET("/update", h.UpdateIP)
|
||||||
|
e.GET("/nic/update", h.UpdateIP)
|
||||||
|
e.GET("/v2/update", h.UpdateIP)
|
||||||
|
e.GET("/v3/update", h.UpdateIP)
|
||||||
|
|
||||||
// Start server
|
// Start server
|
||||||
e.Logger.Fatal(e.Start(":8080"))
|
e.Logger.Fatal(e.Start(":8080"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user