Browse Source

added the `X-Auxilium-Actor` HTTP header

pull/1/head
Cerys 6 months ago
parent
commit
97a4bc28ec
  1. 4
      src/Core/DeegraphServer.php

4
src/Core/DeegraphServer.php

@ -12,10 +12,12 @@ class DeegraphServer
private string $ServerDomain;
private int $Port;
private string $Token;
private string $Actor;
private bool $AllowSelfSignedCerts;
public function __construct(
string $token,
string $actor,
string $server = "localhost",
int $port = 8088,
bool $allowSelfSignedCerts = false)
@ -23,6 +25,7 @@ class DeegraphServer
$this->ServerDomain = $server;
$this->Port = $port;
$this->Token = $token;
$this->Actor = $actor;
$this->AllowSelfSignedCerts = $allowSelfSignedCerts;
}
@ -42,6 +45,7 @@ class DeegraphServer
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
"Authorization: Bearer {$this->Token}",
"X-Auxilium-Actor: {$this->Actor}",
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

Loading…
Cancel
Save