// phpcs:ignoreFile /** * @file * Drupal site-specific configuration file. * * IMPORTANT NOTE: * This file may have been set to read-only by the Drupal installation program. * If you make changes to this file, be sure to protect it again after making * your modifications. Failure to remove write permissions to this file is a * security risk. */ $databases = []; /** * Location of the site configuration files. */ $settings['config_sync_directory'] = $app_root . '/../config/sync'; /** * Salt for one-time login links, cancel links, form tokens, etc. */ // Prefer environment-provided hash salt (e.g. injected from Secrets Manager) $__env_hash_salt = getenv('DRUPAL_HASH_SALT') ?: getenv('HASH_SALT'); if ($__env_hash_salt) { $settings['hash_salt'] = $__env_hash_salt; } else { $settings['hash_salt'] = 'qkpTNQajcOsY2M2AJDuB31qcmcRts_QJaN5T6VND1-oxGTl5wZqBAc8EAAwhIhGbgG4SiDS4wQ'; } /** * Access control for update.php script. */ $settings['update_free_access'] = FALSE; /** * Reverse Proxy Configuration: */ $settings['reverse_proxy'] = TRUE; $settings['reverse_proxy_addresses'] = array($_SERVER['REMOTE_ADDR']); $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR; /** * Optimized assets path: */ $settings['file_assets_path'] = 'sites/default/files'; /** * Public file path: */ $settings['file_public_path'] = 'sites/default/files'; /** * Temporary file path: */ $settings['file_temp_path'] = '/tmp'; /** * Load services definition file. */ $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml'; /** * The default list of directories that will be ignored by Drupal's file API. */ $settings['file_scan_ignore_directories'] = [ 'node_modules', 'bower_components', ]; /** * The default number of entities to update in a batch process. */ $settings['entity_update_batch_size'] = 50; /** * Entity update backup. */ $settings['entity_update_backup'] = TRUE; /** * Node migration type. */ $settings['migrate_node_migrate_type_classic'] = FALSE; // Set execution time for admin operations if (PHP_SAPI !== 'cli') { $current_time = ini_get('max_execution_time'); if ($current_time && $current_time < 300) { ini_set('max_execution_time', '300'); } } // Security settings ini_set('expose_php', 'Off'); // Session cookie settings for better security ini_set('session.cookie_httponly', '1'); ini_set('session.cookie_secure', '1'); if (version_compare(PHP_VERSION, '7.3.0', '>=')) { ini_set('session.cookie_samesite', 'Lax'); } /** * Helper function to convert memory limit strings to bytes */ function return_bytes($val) { $val = trim($val); $last = strtolower($val[strlen($val)-1]); $val = (int) $val; switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $val; } // Trusted hosts are set per-environment in config/env/*.settings.php // Add environment-specific override settings from config/env // Normalise environment names to align with CloudFormation (development/testing/production) $envRaw = getenv('DRUPAL_ENVIRONMENT') ?: getenv('EnvironmentName') ?: getenv('ENVIRONMENT_NAME') ?: getenv('APP_ENV') ?: 'production'; $envRaw = strtolower(trim($envRaw)); // Validate environment and default to production if invalid (fail-closed) $valid_environments = ['local', 'development', 'staging', 'testing', 'production']; switch ($envRaw) { case 'local': $env = 'local'; break; case 'dev': case 'development': $env = 'development'; break; case 'staging': $env = 'staging'; break; case 'testing': case 'test': $env = 'testing'; break; case 'prod': case 'production': case 'live': default: $env = 'production'; } // Config Split activation - ensure only one split is active at a time $config_splits = [ 'local' => 'config_split.config_split.local', 'development' => 'config_split.config_split.development', 'staging' => 'config_split.config_split.staging', 'testing' => 'config_split.config_split.testing', 'production' => 'config_split.config_split.production', ]; // Deactivate all splits first, then activate only the current environment's split foreach ($config_splits as $env_name => $split_id) { $config[$split_id]['status'] = ($env_name === $env); } $env_file = $app_root . '/../config/env/' . $env . '.settings.php'; if (file_exists($env_file)) { include $env_file; } // LEGACY: Hardcoded database connection for development environment // This will be overridden by the environment-specific settings file // The new system will use AWS Secrets Manager via DB_SECRET environment variable $databases['default']['default'] = array ( 'database' => 'qrida-staging', 'username' => 'admin', 'password' => '9pKbF18a4KXx4dM9', 'prefix' => '', 'host' => 'qrida-dev-ecs-cluster-drupaldb-development-v2-cluster.cluster-clcbiuhvsive.ap-southeast-2.rds.amazonaws.com', 'port' => '3306', 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', 'driver' => 'mysql', ); $settings['trusted_host_patterns'] = [ '^qrida\.qld.gov.au$', '^.+\.qrida\.qld.gov.au$', '^qrida-staging\.dev-preview.net$', '^.+\.qrida-staging\.dev-preview.net$', '^localhost$' ]; $config['system.logging']['error_level']='verbose'; Choose language | Drupal

Drupal 11.2.4

Choose language

Translations will be downloaded from the Drupal Translation website. If you do not want this, select English.