From ed521dd33d0d002c577a75e349136fed25b7fda5 Mon Sep 17 00:00:00 2001 From: r Date: Sun, 15 Oct 2023 15:46:54 +0000 Subject: Restrict instance level custom CSS to static directory --- main.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 657912d..9e9ba4e 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,6 @@ import ( "net/http" "os" "path/filepath" - "strings" "bloat/config" "bloat/renderer" @@ -47,14 +46,8 @@ func main() { errExit(err) } - customCSS := config.CustomCSS - if len(customCSS) > 0 && !strings.HasPrefix(customCSS, "http://") && - !strings.HasPrefix(customCSS, "https://") { - customCSS = "/static/" + customCSS - } - s := service.NewService(config.ClientName, config.ClientScope, - config.ClientWebsite, customCSS, config.SingleInstance, + config.ClientWebsite, config.CustomCSS, config.SingleInstance, config.PostFormats, renderer) handler := service.NewHandler(s, *verbose, config.StaticDirectory) -- cgit v1.2.3