File tree 3 files changed +9
-10
lines changed
3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1
- FROM golang:1.16-alpine AS builder
2
- RUN apk add --no-cache git
1
+ FROM golang:1.16-alpine as build-env
3
2
RUN GO111MODULE=on go get -v github.com/projectdiscovery/simplehttpserver/cmd/simplehttpserver
4
3
5
4
FROM alpine:latest
6
5
RUN apk add --no-cache bind-tools ca-certificates
7
- COPY --from=builder /go/bin/simplehttpserver /usr/local/bin/
8
-
9
- ENTRYPOINT ["simplehttpserver" ]
6
+ COPY --from=build-env /go/bin/simplehttpserver /usr/local/bin/simplehttpserver
7
+ ENTRYPOINT ["simplehttpserver" ]
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ const banner = `
8
8
\__ \/ / __ -__ \/ __ \/ / _ \/ /_/ / / / / / / /_/ / ___/ _ \/ ___/ | / / _ \/ ___/
9
9
___/ / / / / / / / /_/ / / __/ __ / / / / / / ____(__ ) __/ / | |/ / __/ /
10
10
/____/_/_/ /_/ /_/ .___/_/\___/_/ /_/ /_/ /_/ /_/ /____/\___/_/ |___/\___/_/
11
- /_/ - v0.0.2
11
+ /_/ - v0.0.3
12
12
`
13
13
14
14
// Version is the current version
15
- const Version = `0.0.2 `
15
+ const Version = `0.0.3 `
16
16
17
17
// showBanner is used to show the banner to the user
18
18
func showBanner () {
Original file line number Diff line number Diff line change @@ -32,12 +32,13 @@ func New(options *Options) (*HTTPServer, error) {
32
32
var h HTTPServer
33
33
EnableUpload = options .EnableUpload
34
34
EnableVerbose = options .Verbose
35
- layers : = h .loglayer (http .FileServer (http .Dir (options .Folder )))
35
+ h . layers = h .loglayer (http .FileServer (http .Dir (options .Folder )))
36
36
if options .BasicAuthUsername != "" || options .BasicAuthPassword != "" {
37
- layers = h .loglayer (h .basicauthlayer (http .FileServer (http .Dir (options .Folder ))))
37
+ h . layers = h .loglayer (h .basicauthlayer (http .FileServer (http .Dir (options .Folder ))))
38
38
}
39
+ h .options = options
39
40
40
- return & HTTPServer { options : options , layers : layers } , nil
41
+ return & h , nil
41
42
}
42
43
43
44
// ListenAndServe requests over http
You can’t perform that action at this time.
0 commit comments