mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge branch '1.8.x' into update-examples
This commit is contained in:
commit
5830942e23
3 changed files with 22 additions and 31 deletions
|
|
@ -718,7 +718,16 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response->setHeader($name, $values);
|
if (\is_array($values)) {
|
||||||
|
$count = 0;
|
||||||
|
foreach ($values as $value) {
|
||||||
|
$override = $count === 0;
|
||||||
|
$response->addHeader($name, $value, override: $override);
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$response->addHeader($name, $values);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$response
|
$response
|
||||||
|
|
|
||||||
24
composer.lock
generated
24
composer.lock
generated
|
|
@ -3942,16 +3942,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/framework",
|
"name": "utopia-php/framework",
|
||||||
"version": "0.33.24",
|
"version": "0.33.27",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/http.git",
|
"url": "https://github.com/utopia-php/http.git",
|
||||||
"reference": "5112b1023342163e3fbedec99f38fc32c8700aa0"
|
"reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/http/zipball/5112b1023342163e3fbedec99f38fc32c8700aa0",
|
"url": "https://api.github.com/repos/utopia-php/http/zipball/d9d10a895e85c8c7675220347cc6109db9d3bd37",
|
||||||
"reference": "5112b1023342163e3fbedec99f38fc32c8700aa0",
|
"reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -3983,9 +3983,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/http/issues",
|
"issues": "https://github.com/utopia-php/http/issues",
|
||||||
"source": "https://github.com/utopia-php/http/tree/0.33.24"
|
"source": "https://github.com/utopia-php/http/tree/0.33.27"
|
||||||
},
|
},
|
||||||
"time": "2025-09-04T04:18:39+00:00"
|
"time": "2025-09-07T18:40:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/image",
|
"name": "utopia-php/image",
|
||||||
|
|
@ -4627,16 +4627,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/swoole",
|
"name": "utopia-php/swoole",
|
||||||
"version": "0.8.3",
|
"version": "0.8.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/swoole.git",
|
"url": "https://github.com/utopia-php/swoole.git",
|
||||||
"reference": "1af73dd3e73987cf729c7db399054e4a70befd99"
|
"reference": "150c30700e738c52348cce9ed0e0f0ff96872081"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/1af73dd3e73987cf729c7db399054e4a70befd99",
|
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/150c30700e738c52348cce9ed0e0f0ff96872081",
|
||||||
"reference": "1af73dd3e73987cf729c7db399054e4a70befd99",
|
"reference": "150c30700e738c52348cce9ed0e0f0ff96872081",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -4672,9 +4672,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/swoole/issues",
|
"issues": "https://github.com/utopia-php/swoole/issues",
|
||||||
"source": "https://github.com/utopia-php/swoole/tree/0.8.3"
|
"source": "https://github.com/utopia-php/swoole/tree/0.8.4"
|
||||||
},
|
},
|
||||||
"time": "2025-03-26T10:09:05+00:00"
|
"time": "2025-09-07T09:39:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/system",
|
"name": "utopia-php/system",
|
||||||
|
|
|
||||||
|
|
@ -955,24 +955,6 @@ class Response extends SwooleResponse
|
||||||
return !empty($this->filters);
|
return !empty($this->filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set Header
|
|
||||||
*
|
|
||||||
* @param string $key
|
|
||||||
* @param string|array<string> $value
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setHeader(string $key, mixed $value): void
|
|
||||||
{
|
|
||||||
if (is_array($value)) {
|
|
||||||
// Temporary solution to support proxying Set-cookie (2 cookies, 1 name)
|
|
||||||
// Ideally this would live in http library, supporting array of values in all adapters
|
|
||||||
$this->swoole->header($key, $value);
|
|
||||||
} else {
|
|
||||||
$this->sendHeader($key, $value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Static wrapper to show sensitive data in response
|
* Static wrapper to show sensitive data in response
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue