Skip to content

Commit

Permalink
remore trailing slash for overrideUrlName
Browse files Browse the repository at this point in the history
  • Loading branch information
jordiprats committed Feb 8, 2021
1 parent c183db0 commit 83f1740
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/deploy/spindeploy/expose_service/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ func (t *exposeTransformer) setStatusAndOverrideBaseUrl(ctx context.Context, ser

// findStatusUrl returns the overrideBaseUrl or load balancer url, indicating if it came from overrideBaseUrl
func (t *exposeTransformer) findStatusUrl(ctx context.Context, serviceName string, overrideUrlName string) (string, bool, error) {
var overrideUrlName_sanitized string
// ignore error, overrideBaseUrl may not be set in hal config
statusUrl, _ := t.svc.GetSpinnakerConfig().GetHalConfigPropString(ctx, overrideUrlName)
if overrideUrlName[len(overrideUrlName)-1:] == "/" {
overrideUrlName_sanitized = overrideUrlName[:len(overrideUrlName)-1]
} else {
overrideUrlName_sanitized = overrideUrlName
}
statusUrl, _ := t.svc.GetSpinnakerConfig().GetHalConfigPropString(ctx, overrideUrlName_sanitized)
if statusUrl != "" {
return statusUrl, true, nil
}
Expand Down

0 comments on commit 83f1740

Please sign in to comment.