From 9504871174848d6c3f47c6ba1d89899d1cd6c7f1 Mon Sep 17 00:00:00 2001 From: Jaime Martinez Date: Wed, 3 Feb 2021 16:51:49 +1100 Subject: Refactor http client usage in httprage Moves the http.Client initialization inside the `httprange` package to the zip VFS. This makes the type `Resource` depend on an http.Client that needs to be passed on initialization. It also makes the zip VFS initialize the client. It's possible to reconfigure it to register a file protocol by calling vfs.Reconfigure explicitly. --- app.go | 1 + 1 file changed, 1 insertion(+) (limited to 'app.go') diff --git a/app.go b/app.go index ec0c36a5..096a1c28 100644 --- a/app.go +++ b/app.go @@ -517,6 +517,7 @@ func runApp(config appConfig) { CleanupInterval: config.ZipCacheCleanup, RefreshInterval: config.ZipCacheRefresh, OpenTimeout: config.ZipeOpenTimeout, + AllowedPaths: []string{config.PagesRoot}, }, } -- cgit v1.2.3