207 lines
7.5 KiB
PHP
207 lines
7.5 KiB
PHP
<?php
|
|
|
|
return [
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Optimierte Domain-Konfiguration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Diese erweiterte Konfiguration bietet zusätzliche Optionen für die
|
|
| optimierte Domain-Routing-Implementation mit verbessertem Caching
|
|
| und Session-Management.
|
|
|
|
|
*/
|
|
|
|
'protocol' => env('APP_PROTOCOL', 'https://'),
|
|
|
|
'domains' => [
|
|
// Die Hauptdomain (z.B. mivita.care)
|
|
'main' => [
|
|
'host' => env('APP_DOMAIN', 'mivita') . env('APP_TLD_CARE', '.care'),
|
|
'type' => 'main',
|
|
'description' => 'Hauptwebsite für Mivita',
|
|
'cache_ttl' => 7200, // 2 Stunden
|
|
],
|
|
|
|
// Die Shop-Domain (z.B. mivita.shop)
|
|
'shop' => [
|
|
'host' => env('APP_DOMAIN', 'mivita') . env('APP_TLD_SHOP', '.shop'),
|
|
'type' => 'main-shop',
|
|
'default_user_shop' => 'aloevera', // Fallback-Shop für diese Domain
|
|
'description' => 'Hauptshop-Domain',
|
|
'cache_ttl' => 3600, // 1 Stunde
|
|
],
|
|
|
|
// Das CRM (z.B. my.mivita.care)
|
|
'crm' => [
|
|
'host' => env('APP_PRE_URL_CRM', 'my.') . env('APP_DOMAIN', 'mivita') . env('APP_TLD_CARE', '.care'),
|
|
'type' => 'crm',
|
|
'description' => 'CRM/Beraterbereich',
|
|
'session_preserve' => true, // UserShop-Session beibehalten
|
|
'cache_ttl' => 1800, // 30 Minuten
|
|
],
|
|
|
|
// Das Partner-Portal (z.B. in.mivita.care)
|
|
'portal' => [
|
|
'host' => env('APP_PRE_URL_PORTAL', 'in.') . env('APP_DOMAIN', 'mivita') . env('APP_TLD_CARE', '.care'),
|
|
'type' => 'portal',
|
|
'description' => 'Kunden-Portal',
|
|
'session_preserve' => true, // UserShop-Session beibehalten
|
|
'cache_ttl' => 1800, // 30 Minuten
|
|
],
|
|
|
|
// Die Checkout-Domain (z.B. checkout.mivita.care)
|
|
'checkout' => [
|
|
'host' => env('APP_URL_CHECKOUT', 'checkout.') . env('APP_DOMAIN', 'mivita') . env('APP_TLD_CARE', '.care'),
|
|
'type' => 'checkout',
|
|
'description' => 'Checkout/Zahlungsabwicklung',
|
|
'session_preserve' => true, // Alle Session-Daten beibehalten
|
|
'cache_ttl' => 900, // 15 Minuten
|
|
],
|
|
|
|
// Die dynamischen User-Shops (z.B. {slug}.mivita.care)
|
|
'user-shop' => [
|
|
'host' => '{subdomain}.' . env('APP_DOMAIN', 'mivita') . env('APP_TLD_CARE', '.care'),
|
|
'type' => 'user-shop',
|
|
'description' => 'Individuelle Berater-Shops',
|
|
'cache_ttl' => 1800, // 30 Minuten
|
|
'validation' => [
|
|
'min_length' => 3,
|
|
'max_length' => 30,
|
|
'pattern' => '^[a-z0-9-]+$',
|
|
],
|
|
],
|
|
],
|
|
|
|
// Reservierte Subdomain-Präfixe
|
|
'reserved_subdomains' => [
|
|
'my', // CRM
|
|
'in', // Portal
|
|
'checkout', // Checkout
|
|
'www', // Standard
|
|
'api', // API-Endpoint
|
|
'mail', // E-Mail-Services
|
|
'admin', // Administration
|
|
'test', // Testing
|
|
'dev', // Development
|
|
'staging', // Staging-Environment
|
|
'cdn', // CDN-Services
|
|
'assets', // Asset-Delivery
|
|
'static', // Static Content
|
|
'ftp', // FTP-Services
|
|
'support', // Support-Portal
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cache-Konfiguration
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'cache' => [
|
|
'enabled' => env('DOMAIN_CACHE_ENABLED', true),
|
|
'default_ttl' => env('DOMAIN_CACHE_TTL', 3600), // 1 Stunde
|
|
'tags' => [
|
|
'domains' => 'domain_parsing',
|
|
'user_shops' => 'user_shops',
|
|
'session_data' => 'domain_sessions',
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cache Warmup Konfiguration
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'cache_warmup_slugs' => [
|
|
'aloevera',
|
|
// Weitere häufig verwendete UserShop-Slugs hier hinzufügen
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Session-Konfiguration
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'session' => [
|
|
// Session-Domain-Strategien
|
|
'domain_strategy' => [
|
|
'shop' => 'shop_tld', // Verwende Shop-TLD (.shop)
|
|
'default' => 'care_tld', // Verwende Care-TLD (.care)
|
|
],
|
|
|
|
// Session-Erhaltung zwischen Domains
|
|
'preserve_across_domains' => [
|
|
'user_shop_data' => ['crm', 'portal', 'checkout', 'user-shop', 'shop'],
|
|
'cart_data' => ['checkout', 'user-shop', 'shop'],
|
|
'language_settings' => ['all'],
|
|
'country_settings' => ['all'],
|
|
],
|
|
|
|
// Session-Bereinigung
|
|
'cleanup_domains' => [
|
|
'main' => ['user_shop', 'user_shop_domain'], // Entferne UserShop-Daten
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Entwickler/Debug-Optionen
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'debug' => [
|
|
'log_domain_resolution' => env('LOG_DOMAIN_RESOLUTION', false),
|
|
'log_session_management' => env('LOG_SESSION_MANAGEMENT', false),
|
|
'log_route_loading' => env('LOG_ROUTE_LOADING', false),
|
|
'detailed_error_logging' => env('DOMAIN_DETAILED_ERROR_LOGGING', false),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Performance-Optimierungen
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'performance' => [
|
|
'eager_load_user_shops' => env('EAGER_LOAD_USER_SHOPS', true),
|
|
'optimize_for_production' => env('OPTIMIZE_DOMAINS_FOR_PRODUCTION', false),
|
|
'route_caching_enabled' => env('DOMAIN_ROUTE_CACHING', true),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Validierung und Sicherheit
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'security' => [
|
|
'validate_user_shop_permissions' => true,
|
|
'require_active_payment' => true,
|
|
'max_redirects' => 3,
|
|
'allowed_redirect_codes' => [301, 302],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Fallback-Konfiguration
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'fallback' => [
|
|
'main_domain' => env('APP_DOMAIN', 'mivita') . env('APP_TLD_CARE', '.care'),
|
|
'redirect_unknown_domains' => true,
|
|
'redirect_code' => 301,
|
|
'preserve_query_params' => false,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Monitoring und Analytics
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
'monitoring' => [
|
|
'track_domain_switches' => env('TRACK_DOMAIN_SWITCHES', false),
|
|
'track_invalid_domains' => env('TRACK_INVALID_DOMAINS', true),
|
|
'analytics_events' => [
|
|
'domain_resolved' => false,
|
|
'user_shop_switched' => true,
|
|
'invalid_domain_accessed' => true,
|
|
],
|
|
],
|
|
];
|