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:
@@ -16,8 +16,9 @@ proc getConfig*(path: string): Config =
|
||||
address: cfg.get("Server", "address", "0.0.0.0"),
|
||||
port: cfg.get("Server", "port", 8080),
|
||||
useHttps: cfg.get("Server", "https", true),
|
||||
title: cfg.get("Server", "title", "Nitter"),
|
||||
staticDir: cfg.get("Server", "staticDir", "./public"),
|
||||
title: cfg.get("Server", "title", "Nitter"),
|
||||
hostname: cfg.get("Server", "hostname", "nitter.net"),
|
||||
|
||||
cacheDir: cfg.get("Cache", "directory", "/tmp/nitter"),
|
||||
profileCacheTime: cfg.get("Cache", "profileMinutes", 10)
|
||||
|
||||
Reference in New Issue
Block a user