# Copyright (c) 2026 "ELEVIO", MB. All rights reserved.

RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

<IfModule mod_authz_core.c>
    Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
</IfModule>

<FilesMatch "^(graphql|pairing|tracking|recovery-cron|recovery|chat|chat-media)\.php$">
    <IfModule mod_authz_core.c>
        Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Allow from all
    </IfModule>
</FilesMatch>

<FilesMatch "^(tracking|consent-adapters|admin-pairing|admin-connections|admin-backoffice|admin-chat-preview|chat-widget)\.js$">
    <IfModule mod_authz_core.c>
        Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Allow from all
    </IfModule>
</FilesMatch>

<FilesMatch "^(qrcode\.min\.js|admin-connections\.css|logo\.png|prestaone-lockup-white\.svg)$">
    <IfModule mod_authz_core.c>
        Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Allow from all
    </IfModule>
</FilesMatch>
