# Hardening for the verification page (Apache / cPanel).

Options -Indexes

# Site settings (.env). Recommended in production: keep the file outside the web root
# and point to it here, e.g. /home/<cpanel-user>/globe-biotech.env. Without this line,
# config/config.php reads .env from this folder (blocked from the web by the rules below).
# SetEnv GB_ENV_FILE /home/<cpanel-user>/globe-biotech.env

# Never serve Composer dependencies, build sources, config, docs, backups or dotfiles (.env).
# vendor/select2 and vendor/tilt are front-end scripts the page loads, so they stay public.
RedirectMatch 404 ^/(?:.*/)?(?:src|config|generalpharma)(?:/|$)
RedirectMatch 404 ^/(?:.*/)?vendor/(?!(?:select2|tilt)/)
<FilesMatch "(^\.|\.(md|lock|bak|old|orig|sql|log|ini|sh|zip)$|^composer\.json$)">
    Require all denied
</FilesMatch>

<IfModule mod_headers.c>
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    Header always set Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()"
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
    Header always set Content-Security-Policy "default-src 'self'; script-src 'self' https://challenges.cloudflare.com https://code.jquery.com https://cdnjs.cloudflare.com https://stackpath.bootstrapcdn.com https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://stackpath.bootstrapcdn.com https://cdnjs.cloudflare.com https://fonts.googleapis.com; font-src 'self' https://cdnjs.cloudflare.com https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' https://protecb.com https://www.google-analytics.com https://*.google-analytics.com https://*.analytics.google.com https://www.googletagmanager.com; frame-src https://challenges.cloudflare.com; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'self'"
</IfModule>
