# Apache configuration for CDN bundle
# Place this file in your CDN directory if using Apache

# Enable CORS
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Methods "GET, HEAD, OPTIONS"
    Header set Access-Control-Allow-Headers "*"
</IfModule>

# Cache control for production bundle
<FilesMatch "\.min\.js$">
    Header set Cache-Control "public, max-age=31536000, immutable"
    Header set Content-Type "application/javascript; charset=utf-8"
</FilesMatch>

# Cache control for development bundle
<FilesMatch "seekora-sdk\.js$">
    Header set Cache-Control "public, max-age=3600"
    Header set Content-Type "application/javascript; charset=utf-8"
</FilesMatch>

# Gzip compression
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/javascript
</IfModule>

# Enable CORS preflight
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} OPTIONS
    RewriteRule ^(.*)$ $1 [R=200,L]
</IfModule>




