mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add _APP_OPTIONS_FORCE_HTTPS to console vars
This commit is contained in:
@@ -51,7 +51,8 @@ App::get('/v1/console/variables')
|
||||
'_APP_VCS_ENABLED' => $isVcsEnabled,
|
||||
'_APP_DOMAIN_ENABLED' => $isDomainEnabled,
|
||||
'_APP_ASSISTANT_ENABLED' => $isAssistantEnabled,
|
||||
'_APP_DOMAIN_SITES' => System::getEnv('_APP_DOMAIN_SITES')
|
||||
'_APP_DOMAIN_SITES' => System::getEnv('_APP_DOMAIN_SITES'),
|
||||
'_APP_OPTIONS_FORCE_HTTPS' => System::getEnv('_APP_OPTIONS_FORCE_HTTPS')
|
||||
]);
|
||||
|
||||
$response->dynamic($variables, Response::MODEL_CONSOLE_VARIABLES);
|
||||
|
||||
@@ -96,6 +96,10 @@
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "8.3"
|
||||
},
|
||||
"allow-plugins": {
|
||||
"php-http/discovery": true,
|
||||
"tbachert/spi": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,16 @@ class ConsoleVariables extends Model
|
||||
'description' => 'A domain to use for site URLs.',
|
||||
'default' => '',
|
||||
'example' => 'sites.localhost',
|
||||
]);
|
||||
])
|
||||
->addRule(
|
||||
'_APP_OPTIONS_FORCE_HTTPS',
|
||||
[
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Defines if HTTPS is enforced for all requests.',
|
||||
'default' => '',
|
||||
'example' => 'enabled',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ class ConsoleConsoleClientTest extends Scope
|
||||
], $this->getHeaders()));
|
||||
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertCount(8, $response['body']);
|
||||
$this->assertCount(9, $response['body']);
|
||||
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET']);
|
||||
$this->assertIsInt($response['body']['_APP_STORAGE_LIMIT']);
|
||||
$this->assertIsInt($response['body']['_APP_COMPUTE_SIZE_LIMIT']);
|
||||
@@ -33,5 +33,6 @@ class ConsoleConsoleClientTest extends Scope
|
||||
$this->assertIsBool($response['body']['_APP_VCS_ENABLED']);
|
||||
$this->assertIsBool($response['body']['_APP_ASSISTANT_ENABLED']);
|
||||
$this->assertIsString($response['body']['_APP_DOMAIN_SITES']);
|
||||
$this->assertIsString($response['body']['_APP_OPTIONS_FORCE_HTTPS']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user