RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# CORS preflight
RewriteRule ^(.*)$ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Ensure PHP files are executed
AddHandler application/x-httpd-php .php

# Deny access to config
<Files "config.php">
    Order Allow,Deny
    Deny from all
</Files>

<Files "helpers.php">
    Order Allow,Deny
    Deny from all
</Files>
