File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 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
32RUN GO111MODULE=on go get -v github.com/projectdiscovery/simplehttpserver/cmd/simplehttpserver
43
54FROM alpine:latest
65RUN 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 = `
88 \__ \/ / __ -__ \/ __ \/ / _ \/ /_/ / / / / / / /_/ / ___/ _ \/ ___/ | / / _ \/ ___/
99 ___/ / / / / / / / /_/ / / __/ __ / / / / / / ____(__ ) __/ / | |/ / __/ /
1010/____/_/_/ /_/ /_/ .___/_/\___/_/ /_/ /_/ /_/ /_/ /____/\___/_/ |___/\___/_/
11- /_/ - v0.0.2
11+ /_/ - v0.0.3
1212`
1313
1414// Version is the current version
15- const Version = `0.0.2 `
15+ const Version = `0.0.3 `
1616
1717// showBanner is used to show the banner to the user
1818func showBanner () {
Original file line number Diff line number Diff line change @@ -32,12 +32,13 @@ func New(options *Options) (*HTTPServer, error) {
3232 var h HTTPServer
3333 EnableUpload = options .EnableUpload
3434 EnableVerbose = options .Verbose
35- layers : = h .loglayer (http .FileServer (http .Dir (options .Folder )))
35+ h . layers = h .loglayer (http .FileServer (http .Dir (options .Folder )))
3636 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 ))))
3838 }
39+ h .options = options
3940
40- return & HTTPServer { options : options , layers : layers } , nil
41+ return & h , nil
4142}
4243
4344// ListenAndServe requests over http
You can’t perform that action at this time.
0 commit comments