mirror of
https://github.com/pterodactyl/panel.git
synced 2026-06-02 11:00:44 -05:00
This is a partial implementation to begin moving towards stripe-style identifiers for resources in the system. Any models with an existing `uuid` column can easily be updated to return an identifier in the format of `prfx_xyz` where `prfx` is a four character prefix, and `xyz` is the UUID, encoded using base-32. These are quite easy to use within the API layer because we just need to do one quick transformation to extract the UUID for those models. This PR implements that logic for servers in the `SubstituteClientBindings` logic. A future PR will need to come through and handle identifiers for models that _don't_ currently use UUIDs for reference that we want to expose to clients. In those cases it is easier to just generate base-32 encoded UUID7s that get stored in the database and indexed. They follow the same base approach, but you don't need to do any transformations in the code (other than stripping the prefix, unless we decide to store the prefix). There is also now a `PTERODACTYL_USE_SERVER_IDENTIFIERS` environment variable, that when set to true, updates the front-end and API response to use this new identifier in place of the `uuidShort` value.
197 lines
6.5 KiB
PHP
197 lines
6.5 KiB
PHP
<?php
|
|
|
|
return [
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Restricted Environment
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Set this environment variable to true to enable a restricted configuration
|
|
| setup on the panel. When set to true, configurations stored in the
|
|
| database will not be applied.
|
|
*/
|
|
|
|
'load_environment_only' => (bool) env('APP_ENVIRONMENT_ONLY', false),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Service Author
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Each panel installation is assigned a unique UUID to identify the
|
|
| author of custom services, and make upgrades easier by identifying
|
|
| standard Pterodactyl shipped services.
|
|
*/
|
|
|
|
'service' => [
|
|
'author' => env('APP_SERVICE_AUTHOR', 'unknown@unknown.com'),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Authentication
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Should login success and failure events trigger an email to the user?
|
|
*/
|
|
|
|
'auth' => [
|
|
'2fa_required' => env('APP_2FA_REQUIRED', 0),
|
|
'2fa' => [
|
|
'bytes' => 32,
|
|
'window' => env('APP_2FA_WINDOW', 4),
|
|
'verify_newer' => true,
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Pagination
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Certain pagination result counts can be configured here and will take
|
|
| effect globally.
|
|
*/
|
|
|
|
'paginate' => [
|
|
'frontend' => [
|
|
'servers' => env('APP_PAGINATE_FRONT_SERVERS', 15),
|
|
],
|
|
'admin' => [
|
|
'servers' => env('APP_PAGINATE_ADMIN_SERVERS', 25),
|
|
'users' => env('APP_PAGINATE_ADMIN_USERS', 25),
|
|
],
|
|
'api' => [
|
|
'nodes' => env('APP_PAGINATE_API_NODES', 25),
|
|
'servers' => env('APP_PAGINATE_API_SERVERS', 25),
|
|
'users' => env('APP_PAGINATE_API_USERS', 25),
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Guzzle Connections
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Configure the timeout to be used for Guzzle connections here.
|
|
*/
|
|
|
|
'guzzle' => [
|
|
'timeout' => env('GUZZLE_TIMEOUT', 15),
|
|
'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 5),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| CDN
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Information for the panel to use when contacting the CDN to confirm
|
|
| if panel is up to date.
|
|
*/
|
|
|
|
'cdn' => [
|
|
'cache_time' => 60,
|
|
'url' => 'https://cdn.pterodactyl.io/releases/latest.json',
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Client Features
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Allow clients to create their own databases.
|
|
*/
|
|
|
|
'client_features' => [
|
|
'databases' => [
|
|
'enabled' => env('PTERODACTYL_CLIENT_DATABASES_ENABLED', true),
|
|
'allow_random' => env('PTERODACTYL_CLIENT_DATABASES_ALLOW_RANDOM', true),
|
|
],
|
|
|
|
'schedules' => [
|
|
// The total number of tasks that can exist for any given schedule at once.
|
|
'per_schedule_task_limit' => env('PTERODACTYL_PER_SCHEDULE_TASK_LIMIT', 10),
|
|
],
|
|
|
|
'allocations' => [
|
|
'enabled' => env('PTERODACTYL_CLIENT_ALLOCATIONS_ENABLED', false),
|
|
'range_start' => env('PTERODACTYL_CLIENT_ALLOCATIONS_RANGE_START'),
|
|
'range_end' => env('PTERODACTYL_CLIENT_ALLOCATIONS_RANGE_END'),
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| File Editor
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This array includes the MIME filetypes that can be edited via the web.
|
|
*/
|
|
|
|
'files' => [
|
|
'max_edit_size' => env('PTERODACTYL_FILES_MAX_EDIT_SIZE', 1024 * 1024 * 4),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Dynamic Environment Variables
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Place dynamic environment variables here that should be auto-appended
|
|
| to server environment fields when the server is created or updated.
|
|
|
|
|
| Items should be in 'key' => 'value' format, where key is the environment
|
|
| variable name, and value is the server-object key. For example:
|
|
|
|
|
| 'P_SERVER_CREATED_AT' => 'created_at'
|
|
*/
|
|
|
|
'environment_variables' => [
|
|
'P_SERVER_ALLOCATION_LIMIT' => 'allocation_limit',
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Asset Verification
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This section controls the output format for JS & CSS assets.
|
|
*/
|
|
|
|
'assets' => [
|
|
'use_hash' => env('PTERODACTYL_USE_ASSET_HASH', false),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Email Notification Settings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This section controls what notifications are sent to users.
|
|
*/
|
|
|
|
'email' => [
|
|
// Should an email be sent to a server owner once their server has completed it's first install process?
|
|
'send_install_notification' => env('PTERODACTYL_SEND_INSTALL_NOTIFICATION', true),
|
|
// Should an email be sent to a server owner whenever their server is reinstalled?
|
|
'send_reinstall_notification' => env('PTERODACTYL_SEND_REINSTALL_NOTIFICATION', true),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Telemetry Settings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This section controls the telemetry sent by Pterodactyl.
|
|
*/
|
|
|
|
'telemetry' => [
|
|
'enabled' => env('PTERODACTYL_TELEMETRY_ENABLED', true),
|
|
],
|
|
|
|
'features' => [
|
|
'new_server_identifiers' => (bool) env('PTERODACTYL_USE_SERVER_IDENTIFIERS', false),
|
|
],
|
|
];
|