From 9ed2bed038b0c35f60fdc1b6de4109b227aca488 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Sat, 25 Apr 2020 11:44:56 +0200 Subject: [PATCH] Blacklist from Query instead of ENV --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index d744a3b..240ca7c 100644 --- a/main.go +++ b/main.go @@ -15,8 +15,6 @@ import ( func main() { lastArticleDir, lastArticleDirSet := os.LookupEnv("LAST_ARTICLE_DIR") - blacklistString, _ := os.LookupEnv("BLACKLIST") - blacklist := strings.Split(blacklistString, ",") if lastArticleDirSet { http.HandleFunc("/hook", func(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodPost { @@ -24,6 +22,8 @@ func main() { return } + blacklist := r.URL.Query()["blacklist"] + feeds, feedsPresent := r.URL.Query()["feed"] if feedsPresent { go func() {