CustodyCollateralAndDocumen.../src/api/utility.go

31 lines
444 B
Go
Raw Normal View History

2023-01-08 11:59:06 +00:00
package api
import (
"strings"
)
func browseSkipper(baseUrl string, path string) bool {
if strings.HasSuffix(path, ".html") || strings.HasSuffix(path, ".json") {
return true
}
if strings.HasSuffix(path, ".ico") {
return true
}
if path == (baseUrl + "/") {
return true
}
if strings.HasPrefix(path, (baseUrl+"/authn/")) {
return true
}
if strings.HasPrefix(path, (baseUrl+"/assets/")) {
return true
}
return false
}