Page MenuHomePhorge

D5322.1775279644.diff
No OneTemporary

Authored By
Unknown
Size
925 B
Referenced Files
None
Subscribers
None

D5322.1775279644.diff

diff --git a/src/app/Backends/DAV.php b/src/app/Backends/DAV.php
--- a/src/app/Backends/DAV.php
+++ b/src/app/Backends/DAV.php
@@ -184,8 +184,9 @@
*/
public static function healthcheck(): bool
{
- // TODO
- return true;
+ $dav = new self();
+ $dav->setUrl(\config('services.dav.uri'));
+ return $dav->options() != false;
}
/**
@@ -859,9 +860,11 @@
$url .= $path;
}
- $client = Http::withBasicAuth($this->user, $this->password)
+ $client = Http::withOptions(['verify' => \config('services.dav.verify')]);
// ->withToken($token) // Bearer token
- ->withOptions(['verify' => \config('services.dav.verify')]);
+ if ($this->user) {
+ $client = $client->withBasicAuth($this->user, $this->password);
+ }
if ($body) {
if (!isset($headers['Content-Type'])) {

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 5:14 AM (1 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828195
Default Alt Text
D5322.1775279644.diff (925 B)

Event Timeline