From 97a4bc28ec047c97acc2b1a73abebf44e5fc2a27 Mon Sep 17 00:00:00 2001 From: Cerys Date: Thu, 6 Jun 2024 00:33:46 +0100 Subject: [PATCH] added the `X-Auxilium-Actor` HTTP header --- src/Core/DeegraphServer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Core/DeegraphServer.php b/src/Core/DeegraphServer.php index 8c32df8..8b73e83 100644 --- a/src/Core/DeegraphServer.php +++ b/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);