Skip to content
This repository has been archived by the owner on Aug 10, 2020. It is now read-only.

Commit

Permalink
[#5] Load forbidden content type from system property
Browse files Browse the repository at this point in the history
  • Loading branch information
creekorful committed Sep 27, 2019
1 parent 138299e commit 46c0dc4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ type PageData struct {
func main() {
log.Println("Initializing crawler")

// build list of forbidden content-type
//TODO: plug this to database
var forbiddenContentTypes = []string{
"application/octet-stream",
}
// build list of forbidden content-type from system property
var forbiddenContentTypes = strings.Split(os.Getenv("FORBIDDEN_CONTENT_TYPES"), ";")
log.Println("Loaded " + strconv.Itoa(len(forbiddenContentTypes)) + " forbidden content types")

// create HTTP client with optimized configuration
// disable SSL check because certificate may not be available inside container
Expand Down

0 comments on commit 46c0dc4

Please sign in to comment.