(routeWithoutPathAndPort string, domain string)
| 172 | } |
| 173 | |
| 174 | func (routeActor routeActor) replaceDomain(routeWithoutPathAndPort string, domain string) (string, error) { |
| 175 | _, flagDomain, err := routeActor.FindDomain(domain) |
| 176 | if err != nil { |
| 177 | return "", err |
| 178 | } |
| 179 | |
| 180 | switch { |
| 181 | case flagDomain.Shared && flagDomain.RouterGroupType == "": // Shared HTTP |
| 182 | host := strings.Split(routeWithoutPathAndPort, ".")[0] |
| 183 | routeWithoutPathAndPort = fmt.Sprintf("%s.%s", host, flagDomain.Name) |
| 184 | default: |
| 185 | routeWithoutPathAndPort = flagDomain.Name |
| 186 | } |
| 187 | |
| 188 | return routeWithoutPathAndPort, nil |
| 189 | } |
| 190 | |
| 191 | func (routeActor routeActor) FindAndBindRoute(routeName string, app models.Application, appParamsFromContext models.AppParams) error { |
| 192 | routeWithoutPath, path := routeActor.FindPath(routeName) |
no test coverage detected