diff options
Diffstat (limited to 'modules/urlfilter/urlfilter.go')
| -rw-r--r-- | modules/urlfilter/urlfilter.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/urlfilter/urlfilter.go b/modules/urlfilter/urlfilter.go index 1297c35..58675e8 100644 --- a/modules/urlfilter/urlfilter.go +++ b/modules/urlfilter/urlfilter.go @@ -16,6 +16,7 @@ func init() { type Module struct { URL string `json:"url"` + URLs []string `json:"urls"` AllowedURLs []string `json:"allowedURLs"` BlockedURLs []string `json:"blockedURLs"` @@ -61,6 +62,11 @@ func (m *Module) ValidateRequest(r *flyscrape.Request) bool { if r.URL == m.URL { return true } + for _, u := range m.URLs { + if r.URL == u { + return true + } + } // allow if no filter is set if len(m.allowedURLsRE) == 0 && len(m.blockedURLsRE) == 0 { |