make http(s) path for serving the account and admin pages configurable

so you can use the host (domain) name of the mail server for serving other
resources too. the default is is still that account is served on /, and so
takes all incoming requests before giving webhandlers a chance.

mox localserve now serves the account pages on /account/
This commit is contained in:
Mechiel Lukkien
2023-03-12 11:52:15 +01:00
parent 0099197d00
commit 10daf3cb81
10 changed files with 92 additions and 59 deletions

View File

@ -26,9 +26,9 @@ func TestServeHTTP(t *testing.T) {
return strings.HasPrefix(dom.ASCII, "mta-sts.")
},
Path: "/.well-known/mta-sts.txt",
Handle: func(w http.ResponseWriter, r *http.Request) {
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("mta-sts!"))
},
}),
},
},
Webserver: true,