Fix wildcard issue with OPTIONS & CORS

This commit is contained in:
Matej Bačo
2023-05-22 21:27:14 +02:00
parent 18105d4999
commit c09c8b4d25
8 changed files with 27 additions and 11 deletions
+2
View File
@@ -124,6 +124,8 @@ ENV _APP_SERVER=swoole \
_APP_LOGGING_PROVIDER= \
_APP_LOGGING_CONFIG=
RUN apk add git
RUN \
if [ "$DEBUG" == "true" ]; then \
apk add boost boost-dev; \
+5
View File
@@ -92,6 +92,7 @@ App::get('/v1/vcs/github/incominginstallation')
$vcsInstallation = $dbForConsole->updateDocument('vcs_installations', $vcsInstallation->getId(), $vcsInstallation);
}
// TODO: Figure out port
$url = $request->getProtocol() . '://' . $request->getHostname() . ":3000/console/project-$state/settings/git-installations";
$response
@@ -132,6 +133,9 @@ App::get('v1/vcs/github/installations/:installationId/repositories')
$privateKey = App::getEnv('VCS_GITHUB_PRIVATE_KEY');
$githubAppId = App::getEnv('VCS_GITHUB_APP_ID');
$github = new GitHub();
\var_dump($installation);
\var_dump($privateKey);
\var_dump($githubAppId);
$github->initialiseVariables($installationId, $privateKey, $githubAppId);
$page = 1;
@@ -247,6 +251,7 @@ App::post('/v1/vcs/github/incomingwebhook')
'activate' => $activate,
]));
// TODO: Figure out port
$targetUrl = $request->getProtocol() . '://' . $request->getHostname() . ":3000/console/project-$projectId/functions/function-$functionId";
$buildEvent = new Build();
+1 -1
View File
@@ -1013,7 +1013,7 @@ App::setResource('console', function () {
'$collection' => ID::custom('platforms'),
'name' => 'Localhost',
'type' => 'web',
'hostname' => 'localhost',
'hostname' => 'matejbaco.loca.lt',
], // Current host is added on app init
],
'legalName' => '',
+2
View File
@@ -274,6 +274,8 @@ class BuildsV1 extends Worker
$command = \str_replace('"', '\\"', $command);
\var_dump($path);
$response = $this->executor->createRuntime(
projectId: $project->getId(),
deploymentId: $deployment->getId(),
+1 -1
View File
@@ -56,7 +56,7 @@
"utopia-php/pools": "0.4.*",
"utopia-php/preloader": "0.2.*",
"utopia-php/domains": "1.1.*",
"utopia-php/framework": "0.26.0",
"utopia-php/framework": "dev-fix-wildcards-g4 as 0.26.99",
"utopia-php/image": "0.5.*",
"utopia-php/dsn": "0.1.*",
"utopia-php/locale": "0.4.*",
Generated
+14 -7
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fc4cf0faa56a3e2d63e7d887ec618a17",
"content-hash": "4478e6ea7546002b03722b73527f1286",
"packages": [
{
"name": "adhocore/jwt",
@@ -2359,16 +2359,16 @@
},
{
"name": "utopia-php/framework",
"version": "0.26.0",
"version": "dev-fix-wildcards-g4",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/framework.git",
"reference": "e8da5576370366d3bf9c574ec855f8c96fe4f34e"
"reference": "3a3ed1296bf31c34bc0a8f80d707cabff2b02f6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/e8da5576370366d3bf9c574ec855f8c96fe4f34e",
"reference": "e8da5576370366d3bf9c574ec855f8c96fe4f34e",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/3a3ed1296bf31c34bc0a8f80d707cabff2b02f6e",
"reference": "3a3ed1296bf31c34bc0a8f80d707cabff2b02f6e",
"shasum": ""
},
"require": {
@@ -2397,9 +2397,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/framework/issues",
"source": "https://github.com/utopia-php/framework/tree/0.26.0"
"source": "https://github.com/utopia-php/framework/tree/fix-wildcards-g4"
},
"time": "2023-01-13T08:14:43+00:00"
"time": "2023-05-22T13:29:36+00:00"
},
{
"name": "utopia-php/image",
@@ -5796,6 +5796,12 @@
"alias": "0.28.99",
"alias_normalized": "0.28.99.0"
},
{
"package": "utopia-php/framework",
"version": "dev-fix-wildcards-g4",
"alias": "0.26.99",
"alias_normalized": "0.26.99.0"
},
{
"package": "utopia-php/vcs",
"version": "dev-feat-git-adapter",
@@ -5805,6 +5811,7 @@
],
"minimum-stability": "stable",
"stability-flags": {
"utopia-php/framework": 20,
"utopia-php/vcs": 20,
"appwrite/sdk-generator": 20
},
+1 -1
View File
@@ -114,7 +114,7 @@ class Func extends Model
->addRule('repositoryId', [
'type' => self::TYPE_STRING,
'description' => 'VCS Repository ID',
'default' => false,
'default' => '',
'example' => '35493993',
])
->addRule('vcsInstallationId', [