fix cleanUrl to add http:// prefix
This commit is contained in:
parent
c09d870b40
commit
7b80b5ddeb
|
@ -28,6 +28,7 @@ func (app *application) cleanUrl(url string) string {
|
||||||
s := strings.TrimPrefix(url, "http://")
|
s := strings.TrimPrefix(url, "http://")
|
||||||
s = strings.TrimPrefix(s, "https://")
|
s = strings.TrimPrefix(s, "https://")
|
||||||
s = path.Base(path.Clean(s))
|
s = path.Base(path.Clean(s))
|
||||||
|
s = "http://" + s
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue