Platform Configuration
Configure application, autoload, class mapping, security and CORS for the alias.
Application and autoload
Define the alias in its own environment-specific platform application file. Set `application` to the alias and `origin` to the existing application. Configure the active contexts, hosts and slugs independently. Alias-specific autoload configuration must make the required origin and custom classes available.
Security, CORS and environment
Prepare security and CORS settings for the alias as required. Configuration files must match the selected environment. The origin configuration is not a universal fallback for missing alias settings.
Configuration and command examples
These examples are preserved from the alias pre-documentation. Review the active environment and application names before applying them.
return [
'application' => 'alias-appnetos-dns-control',
'origin' => 'appnetos-dns-control',
'active' => true,
'contexts' => ['admin', 'admin-rest', 'cmd', 'worker'],
'default_context' => 'admin',
'base_contexts' => [
'admin' => 'admin',
'admin-rest' => 'admin',
'cmd' => 'admin',
'worker' => 'admin',
],
'routes' => [
'admin' => ['slug' => '', 'hosts' => ['http://localhost:20002']],
'admin-rest' => ['slug' => 'rest', 'hosts' => ['http://localhost:20002']],
],
];
'cmd' => [
'directories' => [
'custom/alias-appnetos-dns-control/cmd/src',
'appnetos-dns-control/cmd/src',
'custom/alias-appnetos-dns-control/worker/src',
'appnetos-dns-control/worker/src',
],
],
return [
'application' => 'alias-appnetos-dns-control',
'contexts' => [
'admin-rest' => [
'active' => true,
'origins' => ['http://localhost:20000'],
],
],
];
return [
'application' => 'alias-appnetos-dns-control',
'contexts' => [
'admin' => [
'basic_auth' => [
'active' => true,
'realm' => 'APPNETOS Alias DNS Control',
'users' => ['admin' => 'REPLACE_WITH_OWN_PASSWORD_HASH'],
],
],
'admin-rest' => [
'bearer_auth' => [
'active' => true,
'tokens' => ['admin' => 'REPLACE_WITH_OWN_TOKEN_HASH'],
],
],
],
];