put cookies into a format that the 1984 Hosting website expects

This commit is contained in:
Christophe B Billheimer 2021-09-12 12:37:56 -04:00
parent ea18c47011
commit 8f3b7c179e

View File

@ -229,8 +229,7 @@ _get_zone_id() {
# add extra headers to request # add extra headers to request
_authget() { _authget() {
export _H1="Cookie: $One984HOSTING_SESSIONID_COOKIE" export _H1="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE;$One984HOSTING_SESSIONID_COOKIE"
export _H2="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE"
_response=$(_get "$1" | _normalizeJson) _response=$(_get "$1" | _normalizeJson)
_debug2 _response "$_response" _debug2 _response "$_response"
} }
@ -238,14 +237,12 @@ _authget() {
# truncate huge HTML response # truncate huge HTML response
# echo: Argument list too long # echo: Argument list too long
_htmlget() { _htmlget() {
export _H1="Cookie: $One984HOSTING_SESSIONID_COOKIE" export _H1="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE;$One984HOSTING_SESSIONID_COOKIE"
export _H2="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE"
_response=$(_get "$1" | grep "$2" | _head_n 1) _response=$(_get "$1" | grep "$2" | _head_n 1)
} }
# add extra headers to request # add extra headers to request
_authpost() { _authpost() {
export _H1="Cookie: $One984HOSTING_SESSIONID_COOKIE" export _H1="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE;$One984HOSTING_SESSIONID_COOKIE"
export _H2="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE"
_response=$(_post "$1" "$2") _response=$(_post "$1" "$2")
} }