mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
fix(swarm): fixed issue parsing url with no scheme [EE-4017] (#7502)
This commit is contained in:
parent
27095ede22
commit
a54c54ef24
11 changed files with 67 additions and 50 deletions
|
@ -1,18 +1,6 @@
|
|||
package endpoints
|
||||
|
||||
import "strings"
|
||||
|
||||
func BoolAddr(b bool) *bool {
|
||||
boolVar := b
|
||||
return &boolVar
|
||||
}
|
||||
|
||||
func normalizeAgentAddress(url string) string {
|
||||
// Case insensitive strip http or https scheme if URL entered
|
||||
index := strings.Index(url, "://")
|
||||
if index >= 0 {
|
||||
return url[index+3:]
|
||||
}
|
||||
|
||||
return url
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue