Add host header and use ip address

This commit is contained in:
Micke Nordin 2023-02-13 13:35:25 +01:00
parent a1c56de932
commit 28b54a74a0
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ if ! jq . "${customer_dir}/users.json" &>/dev/null; then
fi fi
if [[ ${status} -eq 0 ]]; then if [[ ${status} -eq 0 ]]; then
# something is wrong if we cant copy the file in 30 seconds, so we should note that # something is wrong if we cant copy the file in 30 seconds, so we should note that
if ! timeout 30s rclone copy --use-cookies "${customer_dir}/users.json" "${base_dir}/${location}/"; then if ! timeout 30s rclone copy --webdav-headers "Host=sunet.drive.sunet.se" --use-cookies "${customer_dir}/users.json" "${base_dir}/${location}/"; then
status=1 status=1
fi fi
fi fi

View file

@ -1,6 +1,6 @@
[statistics] [statistics]
type = webdav type = webdav
url = https://sunet.drive.sunet.se/remote.php/dav/files/_script/ url = https://37.156.196.13/remote.php/dav/files/_script/
vendor = nextcloud vendor = nextcloud
user = _script user = _script
pass = <%= @statistics_secret %> pass = <%= @statistics_secret %>