#Prevent the httpoxy vulnerability see: https://httpoxy.org/
<IfModule mod_headers.c>
    RequestHeader unset Proxy
    #The following are optional you can increase security with them not tested yet
    # Content Security Policy (CSP)
     # Header set Content-Security-Policy "directives"

     # Strict-Transport-Security (HSTS)
     # Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
 
     # X-XSS-Protection
     # Header set X-XSS-Protection "1; mode=block"
 
     # X-Content-Type-Options
     # Header set X-Content-Type-Options "nosniff"
</IfModule>

<IfModule mod_rewrite.c>
    Options -Indexes 
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On
    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]
    # Handle Assets Folder
    RewriteRule ^assets/(.+)$ app/assets/$1 [NC,L]
    RewriteRule ^favicon.ico app/assets/images/favicon.ico [NC,L]
    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
</IfModule>
<IFModule mod_deflate.c>
<filesmatch "\.(js|css|html|jpg|png|php|ico)$">
SetOutputFilter DEFLATE
</filesmatch>
</IFModule>
#Enable this for cache control 1 year Month for most static assets
#<filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
#Header set Cache-Control "max-age=31536000, public"
#</filesMatch>