summaryrefslogtreecommitdiff
path: root/src/http/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/http.go')
-rw-r--r--src/http/http.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/http/http.go b/src/http/http.go
index 6e57a77..4403a69 100644
--- a/src/http/http.go
+++ b/src/http/http.go
@@ -126,9 +126,10 @@ type api struct {
params Params
srv *http.Server
- redirectTpl *template.Template
- auther Auther
- urlBuilder render.URLBuilder
+ redirectTpl *template.Template
+ auther Auther
+ urlBuilder render.URLBuilder
+ postPreprocessFuncs postPreprocessFuncs
}
// New initializes and returns a new API instance, including setting up all
@@ -156,12 +157,12 @@ func New(params Params) (API, error) {
),
}
+ a.postPreprocessFuncs = newPostPreprocessFuncs(a.urlBuilder)
a.redirectTpl = mustParseTpl(template.New(""), "redirect.html")
a.srv = &http.Server{Handler: a.handler()}
go func() {
-
err := a.srv.Serve(l)
if err != nil && !errors.Is(err, http.ErrServerClosed) {
ctx := mctx.WithAnnotator(context.Background(), &a.params)