diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-13 03:00:16 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-13 03:01:10 +0100 |
commit | 1b9c56ac70d8a0af3cd39ba0d49f7651f6ac8fb4 (patch) | |
tree | 9a6c879b129c6e95d5b090dcc7f7b0078f666a2a /src/config | |
parent | 89750ef4ad621fe7fdce533d1265f3d970098a19 (diff) | |
download | chawan-1b9c56ac70d8a0af3cd39ba0d49f7651f6ac8fb4.tar.gz |
Add network.max-redirect, prepend-https options
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config/config.nim b/src/config/config.nim index 16e1c652..e00724df 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -44,6 +44,8 @@ type Config* = ref ConfigObj ConfigObj* = object + maxredirect*: int + prependhttps*: bool termreload*: bool nmap*: ActionMap lemap*: ActionMap @@ -237,6 +239,13 @@ proc parseConfig(config: Config, dir: string, t: TomlValue) = config.startup = v.s of "headless": config.headless = v.b + of "network": + for k, v in v: + case k + of "max-redirects": + config.maxredirect = int(v.i) + of "prepend-https": + config.prependhttps = v.b of "page": for k, v in v: config.nmap[getRealKey(k)] = v.s |