fix (backend): url rewriting - cachable check
This commit is contained in:
parent
8f493e3908
commit
943a385eaa
1 changed files with 3 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue