mirror of
https://github.com/appwrite/appwrite
synced 2026-04-24 23:17:16 +00:00
27 lines
588 B
PHP
27 lines
588 B
PHP
<?php
|
|
|
|
namespace Tests\E2E\Scopes;
|
|
|
|
trait SideClient
|
|
{
|
|
public function getHeaders(bool $devKey = true): array
|
|
{
|
|
$headers = [
|
|
'origin' => 'http://localhost',
|
|
'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session'],
|
|
|
|
];
|
|
if ($devKey && isset($this->getProject()['devKey'])) {
|
|
$headers['x-appwrite-dev-key'] = $this->getProject()['devKey'];
|
|
}
|
|
return $headers;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getSide()
|
|
{
|
|
return 'client';
|
|
}
|
|
}
|