mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Persist cookies between multiple ynh_local_curl calls for the same app
This commit is contained in:
parent
746d046250
commit
e6481b156f
1 changed files with 2 additions and 1 deletions
|
@ -198,6 +198,7 @@ ynh_setup_source () {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Curl abstraction to help with POST requests to local pages (such as installation forms)
|
# Curl abstraction to help with POST requests to local pages (such as installation forms)
|
||||||
|
# For multiple calls, cookies are persisted between each call for the same app
|
||||||
#
|
#
|
||||||
# $domain and $path_url should be defined externally (and correspond to the domain.tld and the /path (of the app?))
|
# $domain and $path_url should be defined externally (and correspond to the domain.tld and the /path (of the app?))
|
||||||
#
|
#
|
||||||
|
@ -238,7 +239,7 @@ ynh_local_curl () {
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# Curl the URL
|
# Curl the URL
|
||||||
curl --silent --show-error -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 $POST_data "$full_page_url"
|
curl --silent --show-error -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 $POST_data "$full_page_url" --cookie-jar /tmp/ynh-$app-cookie.txt --cookie /tmp/ynh-$app-cookie.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
# Render templates with Jinja2
|
# Render templates with Jinja2
|
||||||
|
|
Loading…
Add table
Reference in a new issue