about summary refs log tree commit diff stats
path: root/src/local/container.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-30 18:02:48 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-30 19:02:05 +0200
commit31fbd611aa107cc023dcf1e1358f19ff58f14075 (patch)
treec3360c2f4575a249bb30f18b746ab3a0ce0c91b2 /src/local/container.nim
parentbb2c7cb87a99f790b6c741f85de666dd7aeae10c (diff)
downloadchawan-31fbd611aa107cc023dcf1e1358f19ff58f14075.tar.gz
Add urimethodmap support
yay
Diffstat (limited to 'src/local/container.nim')
-rw-r--r--src/local/container.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/local/container.nim b/src/local/container.nim
index ce049c08..d3d0b879 100644
--- a/src/local/container.nim
+++ b/src/local/container.nim
@@ -822,8 +822,10 @@ proc load(container: Container) =
       if res.code == 0:
         container.triggerEvent(SUCCESS)
         # accept cookies
-        if res.cookies.len > 0 and container.config.cookiejar != nil:
-          container.config.cookiejar.add(res.cookies)
+        let cookiejar = container.config.loaderConfig.cookiejar
+        if res.cookies.len > 0 and cookiejar != nil:
+          cookiejar.add(res.cookies)
+        # set referrer policy, if any
         if res.referrerpolicy.isSome and container.config.referer_from:
           container.config.referrerpolicy = res.referrerpolicy.get
         container.setLoadInfo("Connected to " & $container.source.location & ". Downloading...")