# XC IPTV API - Apache Configuration # CORS (Cross-Origin Resource Sharing) Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Methods "GET, POST, OPTIONS" Header set Access-Control-Allow-Headers "Content-Type, Authorization" # GZIP Compression AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json # Cache Control ExpiresActive On ExpiresByType application/json "access plus 5 minutes" # Security Headers Header set X-Content-Type-Options "nosniff" Header set X-Frame-Options "DENY" Header set X-XSS-Protection "1; mode=block" # Disable Directory Listing Options -Indexes # Protect Config and Sensitive Files Order Allow,Deny Deny from all # Protect Tokens Directory RewriteRule ^tokens/ - [F,L] # Error Pages ErrorDocument 404 /404.html ErrorDocument 500 /500.html # Rewrite Rules (opsiyonel - SEF URLs için) RewriteEngine On RewriteBase / # API endpoint'i temizle # /api/v1 yerine /api RewriteRule ^api/?$ api_secured.php [L] # Maintenance check RewriteCond %{REQUEST_URI} !maintenance.html RewriteCond %{DOCUMENT_ROOT}/maintenance.flag -f RewriteRule .* /maintenance.html [R=503,L] # PHP Settings (eğer izin veriliyorsa) php_value upload_max_filesize 10M php_value post_max_size 10M php_value memory_limit 128M php_value max_execution_time 30