We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38b760a commit 0712f0bCopy full SHA for 0712f0b
pkg/httpserver/httpserver.go
@@ -32,12 +32,13 @@ func New(options *Options) (*HTTPServer, error) {
32
var h HTTPServer
33
EnableUpload = options.EnableUpload
34
EnableVerbose = options.Verbose
35
- layers := h.loglayer(http.FileServer(http.Dir(options.Folder)))
+ h.layers = h.loglayer(http.FileServer(http.Dir(options.Folder)))
36
if options.BasicAuthUsername != "" || options.BasicAuthPassword != "" {
37
- layers = h.loglayer(h.basicauthlayer(http.FileServer(http.Dir(options.Folder))))
+ h.layers = h.loglayer(h.basicauthlayer(http.FileServer(http.Dir(options.Folder))))
38
}
39
+ h.options = options
40
- return &HTTPServer{options: options, layers: layers}, nil
41
+ return &h, nil
42
43
44
// ListenAndServe requests over http
0 commit comments