Merge branch 'feat-git-integration' of https://github.com/appwrite/appwrite into feat-git-integration
This commit is contained in:
commit
1f32b2f6f6
5 changed files with 13 additions and 8 deletions
|
@ -631,6 +631,11 @@ return [
|
||||||
'description' => 'Host is not trusted. Add a custom domain to your project first.',
|
'description' => 'Host is not trusted. Add a custom domain to your project first.',
|
||||||
'code' => 404,
|
'code' => 404,
|
||||||
],
|
],
|
||||||
|
Exception::ROUTER_DOMAIN_NOT_CONFIGURED => [
|
||||||
|
'name' => Exception::ROUTER_DOMAIN_NOT_CONFIGURED,
|
||||||
|
'description' => 'Please configure domain environment variables before using Appwrite outside of localhost.',
|
||||||
|
'code' => 500,
|
||||||
|
],
|
||||||
Exception::RULE_RESOURCE_NOT_FOUND => [
|
Exception::RULE_RESOURCE_NOT_FOUND => [
|
||||||
'name' => Exception::RULE_RESOURCE_NOT_FOUND,
|
'name' => Exception::RULE_RESOURCE_NOT_FOUND,
|
||||||
'description' => 'Resource could not be found. Check resourceId and resourceType.',
|
'description' => 'Resource could not be found. Check resourceId and resourceType.',
|
||||||
|
|
|
@ -61,7 +61,6 @@ return [
|
||||||
Auth::USER_ROLE_GUESTS => [
|
Auth::USER_ROLE_GUESTS => [
|
||||||
'label' => 'Guests',
|
'label' => 'Guests',
|
||||||
'scopes' => [
|
'scopes' => [
|
||||||
'none',
|
|
||||||
'public',
|
'public',
|
||||||
'home',
|
'home',
|
||||||
'console',
|
'console',
|
||||||
|
@ -77,22 +76,22 @@ return [
|
||||||
],
|
],
|
||||||
Auth::USER_ROLE_USERS => [
|
Auth::USER_ROLE_USERS => [
|
||||||
'label' => 'Users',
|
'label' => 'Users',
|
||||||
'scopes' => \array_merge($member, [ 'none' ]),
|
'scopes' => \array_merge($member),
|
||||||
],
|
],
|
||||||
Auth::USER_ROLE_ADMIN => [
|
Auth::USER_ROLE_ADMIN => [
|
||||||
'label' => 'Admin',
|
'label' => 'Admin',
|
||||||
'scopes' => \array_merge($admins, [ 'none' ]),
|
'scopes' => \array_merge($admins),
|
||||||
],
|
],
|
||||||
Auth::USER_ROLE_DEVELOPER => [
|
Auth::USER_ROLE_DEVELOPER => [
|
||||||
'label' => 'Developer',
|
'label' => 'Developer',
|
||||||
'scopes' => \array_merge($admins, [ 'none' ]),
|
'scopes' => \array_merge($admins),
|
||||||
],
|
],
|
||||||
Auth::USER_ROLE_OWNER => [
|
Auth::USER_ROLE_OWNER => [
|
||||||
'label' => 'Owner',
|
'label' => 'Owner',
|
||||||
'scopes' => \array_merge($member, $admins, [ 'none' ]),
|
'scopes' => \array_merge($member, $admins),
|
||||||
],
|
],
|
||||||
Auth::USER_ROLE_APPS => [
|
Auth::USER_ROLE_APPS => [
|
||||||
'label' => 'Applications',
|
'label' => 'Applications',
|
||||||
'scopes' => ['health.read', 'graphql', 'none'],
|
'scopes' => ['health.read', 'graphql'],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -60,7 +60,7 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
|
||||||
$mainDomain = App::getEnv('_APP_DOMAIN', '');
|
$mainDomain = App::getEnv('_APP_DOMAIN', '');
|
||||||
|
|
||||||
if ($mainDomain === 'localhost') {
|
if ($mainDomain === 'localhost') {
|
||||||
throw new AppwriteException(AppwriteException::GENERAL_SERVER_ERROR, 'Please configure domain environment variables before using Appwrite outside of localhost.');
|
throw new AppwriteException(AppwriteException::ROUTER_DOMAIN_NOT_CONFIGURED);
|
||||||
} else {
|
} else {
|
||||||
throw new AppwriteException(AppwriteException::ROUTER_HOST_NOT_FOUND);
|
throw new AppwriteException(AppwriteException::ROUTER_HOST_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ const APP_AUTH_TYPE_ADMIN = 'Admin';
|
||||||
// Response related
|
// Response related
|
||||||
const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB
|
const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB
|
||||||
// Function headers
|
// Function headers
|
||||||
const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length'];
|
const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host'];
|
||||||
const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length'];
|
const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length'];
|
||||||
// Usage metrics
|
// Usage metrics
|
||||||
const METRIC_TEAMS = 'teams';
|
const METRIC_TEAMS = 'teams';
|
||||||
|
|
|
@ -195,6 +195,7 @@ class Exception extends \Exception
|
||||||
|
|
||||||
/** Router */
|
/** Router */
|
||||||
public const ROUTER_HOST_NOT_FOUND = 'router_host_not_found';
|
public const ROUTER_HOST_NOT_FOUND = 'router_host_not_found';
|
||||||
|
public const ROUTER_DOMAIN_NOT_CONFIGURED = 'router_domain_not_configured';
|
||||||
|
|
||||||
/** Proxy */
|
/** Proxy */
|
||||||
public const RULE_RESOURCE_NOT_FOUND = 'rule_resource_not_found';
|
public const RULE_RESOURCE_NOT_FOUND = 'rule_resource_not_found';
|
||||||
|
|
Loading…
Reference in a new issue