Skip to content

Commit bbcbfd0

Browse files
pl4ntyColdHeat
andauthored
Add configurable cookies via config file (#114)
* Add configurable cookies via config file --------- Co-authored-by: Kevin Chung <[email protected]>
1 parent 31c92d0 commit bbcbfd0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ctfcli/utils/config.py

+5
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,9 @@ def generate_session():
8080
s = APISession(prefix_url=url)
8181
s.verify = ssl_verify
8282
s.headers.update({"Authorization": f"Token {access_token}"})
83+
84+
# Handle cookies section in config
85+
if "cookies" in config:
86+
s.cookies.update(dict(config["cookies"]))
87+
8388
return s

0 commit comments

Comments
 (0)