fix (backend): url rewriting - cachable check

This commit is contained in:
ShiKhu 2021-07-05 19:55:52 +03:00
parent 8f493e3908
commit 943a385eaa

View file

@ -12,6 +12,9 @@ func getSessionKey(sessionID uint64) string {
}
func ResolveURL(baseurl string, rawurl string) string {
if !isRelativeCachable(rawurl) {
return rawurl
}
base, _ := url.ParseRequestURI(baseurl) // fn Only for base urls
u, _ := url.Parse(rawurl) // TODO: handle errors ?
if base == nil || u == nil {