Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117812088
D5322.1775279644.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
925 B
Referenced Files
None
Subscribers
None
D5322.1775279644.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5322: DAV healthcheck
Attached
Detach File
Event Timeline