Refactor hostname to be a runtime option

Add a `hostname` field under Server in your conf file, see the
updated nitter.conf in the repo for an example. The compile-time
option (-d:hostname) is no longer used.
This commit is contained in:
Zed
2019-10-21 05:19:00 +02:00
parent 3218cc4069
commit de62eedea5
19 changed files with 91 additions and 85 deletions

View File

@ -7,14 +7,14 @@ import ../views/[general, about]
proc createUnsupportedRouter*(cfg: Config) =
router unsupported:
get "/about/feature":
resp renderMain(renderFeature(), request, cfg.title)
resp renderMain(renderFeature(), request, cfg)
get "/intent/?@i?":
resp renderMain(renderFeature(), request, cfg.title)
resp renderMain(renderFeature(), request, cfg)
get "/login/?@i?":
resp renderMain(renderFeature(), request, cfg.title)
resp renderMain(renderFeature(), request, cfg)
get "/i/@i?/?@j?":
cond @"i" != "status"
resp renderMain(renderFeature(), request, cfg.title)
resp renderMain(renderFeature(), request, cfg)