41 lines
1.3 KiB
PHP
41 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Configuration file for Nano Banana Pro Image Generator
|
|
*
|
|
* IMPORTANT: Copy this file to config.php and add your Google Gemini API key
|
|
*/
|
|
|
|
// Load environment variables from .env file
|
|
if (file_exists(__DIR__ . '/env_loader.php')) {
|
|
require_once __DIR__ . '/env_loader.php';
|
|
}
|
|
|
|
// Google Gemini API Key (Nano Banana Pro)
|
|
// Get your API key from: https://aistudio.google.com/app/apikey
|
|
define('GEMINI_API_KEY', 'AIzaSyDMWN_PAnyU7bPmtWcEKq4LJfiu1KuwUsU');
|
|
|
|
// MSAL / Azure AD SSO Configuration
|
|
// Always define these constants with defaults if not set
|
|
if (!defined('SSO_ENABLED')) {
|
|
define('SSO_ENABLED', getenv('SSO_ENABLED') === 'true');
|
|
}
|
|
if (!defined('SSO_TENANT_ID')) {
|
|
define('SSO_TENANT_ID', getenv('SSO_TENANT_ID') ?: '');
|
|
}
|
|
if (!defined('SSO_CLIENT_ID')) {
|
|
define('SSO_CLIENT_ID', getenv('SSO_CLIENT_ID') ?: '');
|
|
}
|
|
|
|
// Session configuration
|
|
ini_set('session.gc_maxlifetime', 3600); // 1 hour
|
|
ini_set('session.cookie_lifetime', 3600);
|
|
|
|
// Increase limits for large image uploads (base64 encoded images are large)
|
|
ini_set('post_max_size', '100M');
|
|
ini_set('upload_max_filesize', '100M');
|
|
ini_set('memory_limit', '256M');
|
|
|
|
// Error reporting (display_errors must be 0 for JSON APIs)
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors', 0);
|
|
ini_set('log_errors', 1);
|