RewriteEngine On

#RewriteBase /
#Redirect for CORS Preflight request

#RewriteCond %{HTTP_HOST} ^core\.sulspapmfb\.com [NC]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://core.sulspapmfb.com/$1 [R,L]


SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
<IfModule mod_headers.c>

Header set Access-Control-Allow-Origin '*'
Header set Access-Control-Expose-Headers  'Access-Control-Allow-Origin,Access-Control-Allow-Credentials,Authorization'
Header set Access-Control-Max-Age 3600
Header set Access-Control-Allow-Methods 'GET, POST, OPTIONS, DELETE, PUT'
Header set Access-Control-Allow-Headers 'Authorization,X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method,X-Auth-Signature'
Header set Access-Control-Allow-Credentials true

</IfModule>



RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ protection_public/index.php?$1 [L,QSA]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
