mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 03:26:30 +00:00
Improve cookie security
This commit is contained in:
parent
7dfbc16f4c
commit
11887b793a
3 changed files with 4 additions and 4 deletions
|
@ -11,8 +11,8 @@ bin = @["nitter"]
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.19.9"
|
requires "nim >= 0.19.9"
|
||||||
requires "norm >= 1.0.11"
|
requires "norm <= 1.0.11"
|
||||||
requires "jester >= 0.4.1"
|
requires "jester >= 0.4.3"
|
||||||
requires "regex >= 0.11.2"
|
requires "regex >= 0.11.2"
|
||||||
requires "q >= 0.0.7"
|
requires "q >= 0.0.7"
|
||||||
requires "nimcrypto >= 0.3.9"
|
requires "nimcrypto >= 0.3.9"
|
||||||
|
|
|
@ -92,7 +92,7 @@ routes:
|
||||||
post "/saveprefs":
|
post "/saveprefs":
|
||||||
var prefs = getCookiePrefs(request)
|
var prefs = getCookiePrefs(request)
|
||||||
genUpdatePrefs()
|
genUpdatePrefs()
|
||||||
setCookie("preferences", $prefs.id, daysForward(360))
|
setCookie("preferences", $prefs.id, daysForward(360), httpOnly=true, secure=true)
|
||||||
redirect("/settings")
|
redirect("/settings")
|
||||||
|
|
||||||
get "/settings":
|
get "/settings":
|
||||||
|
|
|
@ -46,7 +46,7 @@ const prefList*: Table[string, seq[Pref]] = {
|
||||||
|
|
||||||
"Display": @[
|
"Display": @[
|
||||||
Pref(kind: checkbox, name: "hideTweetStats",
|
Pref(kind: checkbox, name: "hideTweetStats",
|
||||||
label: "Hide tweet stats (replies, retweets, likes",
|
label: "Hide tweet stats (replies, retweets, likes)",
|
||||||
defaultState: false),
|
defaultState: false),
|
||||||
|
|
||||||
Pref(kind: checkbox, name: "hideBanner", label: "Hide profile banner",
|
Pref(kind: checkbox, name: "hideBanner", label: "Hide profile banner",
|
||||||
|
|
Loading…
Reference in a new issue