hotfix(server/auth): add old route /openvpn/portforwarded as valid
This commit is contained in:
@@ -20,6 +20,7 @@ func New(settings Settings, debugLogger DebugLogger) (
|
|||||||
routeToRoles: routeToRoles,
|
routeToRoles: routeToRoles,
|
||||||
unprotectedRoutes: map[string]struct{}{
|
unprotectedRoutes: map[string]struct{}{
|
||||||
http.MethodGet + " /openvpn/actions/restart": {},
|
http.MethodGet + " /openvpn/actions/restart": {},
|
||||||
|
http.MethodGet + " /openvpn/portforwarded": {},
|
||||||
http.MethodGet + " /unbound/actions/restart": {},
|
http.MethodGet + " /unbound/actions/restart": {},
|
||||||
http.MethodGet + " /updater/restart": {},
|
http.MethodGet + " /updater/restart": {},
|
||||||
http.MethodGet + " /v1/version": {},
|
http.MethodGet + " /v1/version": {},
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ func (s *Settings) SetDefaults() {
|
|||||||
Routes: []string{
|
Routes: []string{
|
||||||
http.MethodGet + " /openvpn/actions/restart",
|
http.MethodGet + " /openvpn/actions/restart",
|
||||||
http.MethodGet + " /unbound/actions/restart",
|
http.MethodGet + " /unbound/actions/restart",
|
||||||
|
http.MethodGet + " /openvpn/portforwarded",
|
||||||
http.MethodGet + " /updater/restart",
|
http.MethodGet + " /updater/restart",
|
||||||
http.MethodGet + " /v1/version",
|
http.MethodGet + " /v1/version",
|
||||||
http.MethodGet + " /v1/vpn/status",
|
http.MethodGet + " /v1/vpn/status",
|
||||||
@@ -112,6 +113,8 @@ func (r Role) validate() (err error) {
|
|||||||
// WARNING: do not mutate programmatically.
|
// WARNING: do not mutate programmatically.
|
||||||
var validRoutes = map[string]struct{}{ //nolint:gochecknoglobals
|
var validRoutes = map[string]struct{}{ //nolint:gochecknoglobals
|
||||||
http.MethodGet + " /openvpn/actions/restart": {},
|
http.MethodGet + " /openvpn/actions/restart": {},
|
||||||
|
http.MethodGet + " /openvpn/portforwarded": {},
|
||||||
|
http.MethodGet + " /openvpn/settings": {},
|
||||||
http.MethodGet + " /unbound/actions/restart": {},
|
http.MethodGet + " /unbound/actions/restart": {},
|
||||||
http.MethodGet + " /updater/restart": {},
|
http.MethodGet + " /updater/restart": {},
|
||||||
http.MethodGet + " /v1/version": {},
|
http.MethodGet + " /v1/version": {},
|
||||||
|
|||||||
Reference in New Issue
Block a user