feat(server/portforward): change route from /v1/openvpn/portforwarded to /v1/portforward
- This route has nothing to do with openvpn specifically - Remove the `ed` in `portforwarded` to accomodate future routes such as changing the state of port forwarding - maintaining retrocompatibility with `/v1/openvpn/portforwarded` - maintaining retrocompatibility with `/openvpn/portforwarded` - Moved to its own handler `/v1/portforward` instead of `/v1/vpn/portforward` to reduce the complexity of the vpn handler
This commit is contained in:
@@ -35,6 +35,7 @@ func (s *Settings) SetDefaults() {
|
||||
http.MethodGet + " /v1/updater/status",
|
||||
http.MethodPut + " /v1/updater/status",
|
||||
http.MethodGet + " /v1/publicip/ip",
|
||||
http.MethodGet + " /v1/portforward",
|
||||
},
|
||||
}})
|
||||
}
|
||||
@@ -131,4 +132,5 @@ var validRoutes = map[string]struct{}{ //nolint:gochecknoglobals
|
||||
http.MethodGet + " /v1/updater/status": {},
|
||||
http.MethodPut + " /v1/updater/status": {},
|
||||
http.MethodGet + " /v1/publicip/ip": {},
|
||||
http.MethodGet + " /v1/portforward": {},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user