From d0a32c1278ac0077eacc0c601364422590b060a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kenan=20Faruk=20=C3=87ak=C4=B1r?= Date: Sun, 29 Jan 2023 14:31:32 +0000 Subject: [PATCH] absolute url check --- config/csv.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/csv.go b/config/csv.go index eddda833..cb03c26d 100644 --- a/config/csv.go +++ b/config/csv.go @@ -26,7 +26,8 @@ func readCsv(conf CsvConf) ([]map[string]interface{}, error) { var reader io.Reader - if _, err = url.ParseRequestURI(conf.Path); err == nil { // url + var pUrl *url.URL + if pUrl, err = url.ParseRequestURI(conf.Path); err == nil && pUrl.IsAbs() { // url req, err := http.NewRequest(http.MethodGet, conf.Path, nil) if err != nil { return nil, err