Files
portal/app/config/admin.php
T

21 lines
934 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
return [
// Логины nginx HTTP Basic Auth (.htpasswd-admin), допущенные в saas-admin зону.
// CSV из env; дефолт совпадает с прод-.htpasswd (единственный логин — admin).
'basic_auth_allowlist' => array_values(array_filter(array_map(
'trim',
explode(',', (string) env('ADMIN_ALLOWED_USERS', 'admin')),
))),
// Включение fail-closed гейта. В local/testing — выкл (nginx нет, тесты
// аутентифицируются иначе); на проде/staging — вкл. Только env() — config
// грузится до готовности контейнера, app()->environment() здесь падает.
'basic_auth_gate' => (bool) env(
'ADMIN_GATE_ENFORCED',
! in_array(env('APP_ENV', 'production'), ['local', 'testing'], true),
),
];