minor issue fixes and reset config to default

This commit is contained in:
dmitrijgulacenkov committed 2020-10-09 13:49:47 +03:00
1 parent e2d8bd206c
commit c1410dfef1
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ httpInnerAddress:
ip: 0.0.0.0
port: 9003
moduleName: isp-gate
instanceUuid: bac77382-dfd1-440d-82b5-20fe4f5ac6d0
instanceUuid: 9d89354b-c728-4b48-b002-a7d3b229f151
locations:
- pathPrefix: /api
protocol: http
+5 -2
View File
@@ -19,7 +19,7 @@ func InitRoutes(configs structure.RoutingConfig) {
if backend.Address.IP == "" {
continue
}
if backend.HandlersInfo == nil {
if len(backend.HandlersInfo) == 0 {
if len(backend.Endpoints) == 0 || backend.Address.Port == "" {
continue
}
@@ -37,7 +37,10 @@ func InitRoutes(configs structure.RoutingConfig) {
AuthUserMethods = newAuthUserAddressMap
}
func addEndpointsToMaps(endpoints []structure.EndpointDescriptor, pathPrefix string, newAddressMap map[string]bool, newInnerAddressMap map[string]bool, newAuthUserAddressMap map[string]bool) { //nolint
func addEndpointsToMaps(endpoints []structure.EndpointDescriptor,
pathPrefix string, newAddressMap map[string]bool,
newInnerAddressMap map[string]bool,
newAuthUserAddressMap map[string]bool) {
for _, el := range endpoints {
if pathPrefix != "" {
el.Path = pathPrefix + "/" + el.Path