mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 05:01:40 +00:00
add Referer and X-CSRFToken HTTP headers
This commit is contained in:
parent
8f3b7c179e
commit
c668c603cc
@ -243,6 +243,10 @@ _htmlget() {
|
||||
|
||||
# add extra headers to request
|
||||
_authpost() {
|
||||
_get_zone_id "$@"
|
||||
csrf_header="$(echo "$One984HOSTING_CSRFTOKEN_COOKIE" | _egrep_o "=[^=][0-9a-zA-Z]*" | tr -d "=")"
|
||||
export _H1="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE;$One984HOSTING_SESSIONID_COOKIE"
|
||||
export _H2="Referer: https://management.1984hosting.com/domains/$_zone_id"
|
||||
export _H3="X-CSRFToken: $csrf_header"
|
||||
_response=$(_post "$1" "$2")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user