Skip to content

Commit

Permalink
Add configurable cookies via config file (#114)
Browse files Browse the repository at this point in the history
* Add configurable cookies via config file

---------

Co-authored-by: Kevin Chung <kchung@nyu.edu>
  • Loading branch information
pl4nty and ColdHeat committed May 17, 2023
1 parent 31c92d0 commit bbcbfd0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ctfcli/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,9 @@ def generate_session():
s = APISession(prefix_url=url)
s.verify = ssl_verify
s.headers.update({"Authorization": f"Token {access_token}"})

# Handle cookies section in config
if "cookies" in config:
s.cookies.update(dict(config["cookies"]))

return s

0 comments on commit bbcbfd0

Please sign in to comment.