feat: dist/ pridan do repa pro server deploy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
38
dist/api/includes/constants.php
vendored
Normal file
38
dist/api/includes/constants.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Aplikacni konstanty
|
||||
*
|
||||
* Definuje konstanty pouzivane v celé API.
|
||||
* Vyzaduje, aby byl pred includovanim tohoto souboru nacten helpers.php a .env.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
// Environment
|
||||
define('APP_ENV', env('APP_ENV', 'production'));
|
||||
define('DEBUG_MODE', APP_ENV === 'local');
|
||||
|
||||
// Database configuration
|
||||
define('DB_HOST', env('DB_HOST', 'localhost'));
|
||||
define('DB_NAME', env('DB_NAME', ''));
|
||||
define('DB_USER', env('DB_USER', ''));
|
||||
define('DB_PASS', env('DB_PASS', ''));
|
||||
define('DB_CHARSET', 'utf8mb4');
|
||||
|
||||
// Security configuration
|
||||
define('MAX_LOGIN_ATTEMPTS', 5);
|
||||
define('LOCKOUT_MINUTES', 15);
|
||||
define('BCRYPT_COST', 12);
|
||||
|
||||
// CORS - konfigurovatelne pres env (comma-separated), fallback na hardcoded hodnoty
|
||||
define('CORS_ALLOWED_ORIGINS', env('CORS_ALLOWED_ORIGINS', '')
|
||||
? array_map('trim', explode(',', (string) env('CORS_ALLOWED_ORIGINS', '')))
|
||||
: ['http://www.boha-automation.cz', 'https://www.boha-automation.cz']);
|
||||
|
||||
// Paths
|
||||
define('API_ROOT', dirname(__DIR__));
|
||||
define('INCLUDES_PATH', API_ROOT . '/includes');
|
||||
|
||||
// Rate limiting
|
||||
define('RATE_LIMIT_STORAGE_PATH', dirname(__DIR__) . '/rate_limits');
|
||||
Reference in New Issue
Block a user