mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
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:
parent
3218cc4069
commit
de62eedea5
19 changed files with 91 additions and 85 deletions
|
|
@ -15,7 +15,7 @@ proc createPrefRouter*(cfg: Config) =
|
|||
|
||||
get "/settings":
|
||||
let html = renderPreferences(cookiePrefs(), refPath())
|
||||
resp renderMain(html, request, cfg.title, "Preferences")
|
||||
resp renderMain(html, request, cfg, "Preferences")
|
||||
|
||||
get "/settings/@i?":
|
||||
redirect("/settings")
|
||||
|
|
@ -28,7 +28,7 @@ proc createPrefRouter*(cfg: Config) =
|
|||
|
||||
post "/resetprefs":
|
||||
var prefs = cookiePrefs()
|
||||
resetPrefs(prefs)
|
||||
resetPrefs(prefs, cfg.hostname)
|
||||
savePrefs()
|
||||
redirect($(parseUri("/settings") ? filterParams(request.params)))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue