summaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2023-01-20 14:50:36 +0100
committerBrian Picciano <mediocregopher@gmail.com>2023-01-20 14:50:36 +0100
commit84c1322c44c68c19e88f9695ded286b26d1621aa (patch)
tree229595b9718de59f347f2583156fee70459f3006 /src/http
parent0bd8bd6f2366e60212dd0305a584427b7b1aab26 (diff)
Got a basic gemini server running
Diffstat (limited to 'src/http')
-rw-r--r--src/http/http.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/http.go b/src/http/http.go
index e5ca3f1..da39374 100644
--- a/src/http/http.go
+++ b/src/http/http.go
@@ -64,7 +64,7 @@ func (p *Params) SetupCfg(cfg *cfg.Cfg) {
publicURLStr := cfg.String("http-public-url", "http://localhost:4000", "URL this service is accessible at")
cfg.StringVar(&p.ListenProto, "http-listen-proto", "tcp", "Protocol to listen for HTTP requests with")
- cfg.StringVar(&p.ListenAddr, "http-listen-addr", ":4000", "Address/path to listen for HTTP requests on")
+ cfg.StringVar(&p.ListenAddr, "http-listen-addr", ":4000", "Address/unix socket path to listen for HTTP requests on")
httpAuthUsersStr := cfg.String("http-auth-users", "{}", "JSON object with usernames as values and password hashes (produced by the hash-password binary) as values. Denotes users which are able to edit server-side data")
@@ -141,7 +141,7 @@ func New(params Params) (API, error) {
err := a.srv.Serve(l)
if err != nil && !errors.Is(err, http.ErrServerClosed) {
- ctx := mctx.Annotate(context.Background(), a.params)
+ ctx := mctx.WithAnnotator(context.Background(), &a.params)
params.Logger.Fatal(ctx, "serving http server", err)
}
}()