fix: hoist COOKIE_JAR outside function to avoid unbound variable
This commit is contained in:
parent
acd9671359
commit
ccd362a964
1 changed files with 4 additions and 2 deletions
|
|
@ -264,9 +264,11 @@ EOF
|
|||
done
|
||||
sleep 1
|
||||
|
||||
# Helper: fetch CSRF token + cookie jar from Zoraxy login page
|
||||
# Shared cookie jar for CSRF-authenticated Zoraxy API calls
|
||||
COOKIE_JAR="/tmp/zoraxy_cookies.txt"
|
||||
|
||||
# Helper: fetch CSRF token from Zoraxy login page (uses $COOKIE_JAR)
|
||||
fetch_csrf() {
|
||||
COOKIE_JAR="/tmp/zoraxy_cookies.txt"
|
||||
rm -f "$COOKIE_JAR"
|
||||
local page
|
||||
page=$(curl -sL -c "$COOKIE_JAR" http://127.0.0.1:8000/ 2>&1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue