Options -Indexes
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?altum=$1 [QSA,L]

<IfModule mod_expires.c>
    <filesMatch ".(gif|ico|jpg|jpeg|png|svg|webp)$">
        Header set Cache-Control "max-age=31536000, public"
    </filesMatch>

    <filesMatch ".(js|css)$">
        Header set Cache-Control "max-age=31536000, public"
    </filesMatch>
</IfModule>

<IfModule mod_brotli.c>
    SetOutputFilter BROTLI_COMPRESS
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-brotli
    AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.json$">
        Header set Access-Control-Allow-Origin "*"
        Header set Access-Control-Allow-Methods "GET"
        Header set Access-Control-Allow-Headers "Content-Type"
    </FilesMatch>
</IfModule>

<IfModule mod_headers.c>
    <Files ~ "sw\.js">
        Header set Service-Worker-Allowed: /
    </Files>
</IfModule>
