1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

router_static.go: set Content-Type header

This commit is contained in:
Adhityaa
2018-06-03 20:19:36 +05:30
parent 7e9713b35e
commit efb23778b8
2 changed files with 9 additions and 6 deletions

View File

@ -26,10 +26,10 @@ func stripDomain(domain string) string {
return noProtocol
}
var path = regexp.MustCompile(`(https?://[^/]*)`)
var pathMatch = regexp.MustCompile(`(https?://[^/]*)`)
func stripPath(url string) string {
strippedPath := path.ReplaceAllString(url, ``)
strippedPath := pathMatch.ReplaceAllString(url, ``)
return strippedPath
}