summaryrefslogtreecommitdiff
path: root/srv/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'srv/cmd')
-rw-r--r--srv/cmd/mediocre-blog/main.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/srv/cmd/mediocre-blog/main.go b/srv/cmd/mediocre-blog/main.go
index f912f45..5233a2c 100644
--- a/srv/cmd/mediocre-blog/main.go
+++ b/srv/cmd/mediocre-blog/main.go
@@ -143,8 +143,8 @@ func main() {
Store: mlStore,
Mailer: mailer,
Clock: clock,
- FinalizeSubURL: path.Join(publicURL.String(), "/mailinglist/finalize.html"),
- UnsubURL: path.Join(publicURL.String(), "/mailinglist/unsubscribe.html"),
+ FinalizeSubURL: publicURL.String() + "/mailinglist/finalize.html",
+ UnsubURL: publicURL.String() + "/mailinglist/unsubscribe.html",
})
mux := http.NewServeMux()
@@ -183,6 +183,12 @@ func main() {
loggerFatalErr(ctx, logger, "creating listen socket", err)
}
+ if *listenProto == "unix" {
+ if err := os.Chmod(*listenAddr, 0777); err != nil {
+ loggerFatalErr(ctx, logger, "chmod-ing unix socket", err)
+ }
+ }
+
srv := &http.Server{Handler: mux}
go func() {
if err := srv.Serve(l); err != nil && !errors.Is(err, http.ErrServerClosed) {