guard/util.go

18 lines
216 B
Go
Raw Permalink Normal View History

2021-11-19 06:35:53 +00:00
package guard
import (
"net/http"
2021-11-19 12:09:50 +00:00
"path/filepath"
2021-11-19 06:35:53 +00:00
)
2021-11-19 12:09:50 +00:00
func SkipStatic(r *http.Request) bool {
switch filepath.Ext(r.URL.Path) {
case ".js":
fallthrough
case ".css":
return true
default:
return false
2021-11-19 06:35:53 +00:00
}
}