guard/util.go

18 lines
216 B
Go

package guard
import (
"net/http"
"path/filepath"
)
func SkipStatic(r *http.Request) bool {
switch filepath.Ext(r.URL.Path) {
case ".js":
fallthrough
case ".css":
return true
default:
return false
}
}