summaryrefslogtreecommitdiff
path: root/srv/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'srv/src/cmd')
-rw-r--r--srv/src/cmd/mediocre-blog/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/srv/src/cmd/mediocre-blog/main.go b/srv/src/cmd/mediocre-blog/main.go
index 2660ea4..092c4da 100644
--- a/srv/src/cmd/mediocre-blog/main.go
+++ b/srv/src/cmd/mediocre-blog/main.go
@@ -53,6 +53,8 @@ func main() {
chatGlobalRoomMaxMsgs := cfg.Int("chat-global-room-max-messages", 1000, "Maximum number of messages the global chat room can retain")
chatUserIDCalcSecret := cfg.String("chat-user-id-calc-secret", "", "Secret to use when calculating user ids")
+ pathPrefix := cfg.String("path-prefix", "", "Prefix which is optionally applied to all URL paths rendered by the blog")
+
// initialization
err := cfg.Init(ctx)
@@ -70,6 +72,10 @@ func main() {
"chatGlobalRoomMaxMsgs", *chatGlobalRoomMaxMsgs,
)
+ if *pathPrefix != "" {
+ ctx = mctx.Annotate(ctx, "pathPrefix", *pathPrefix)
+ }
+
clock := clock.Realtime()
powStore := pow.NewMemoryStore(clock)
@@ -124,6 +130,7 @@ func main() {
apiParams.Logger = logger.WithNamespace("api")
apiParams.PowManager = powMgr
+ apiParams.PathPrefix = *pathPrefix
apiParams.PostStore = postStore
apiParams.PostAssetStore = postAssetStore
apiParams.MailingList = ml