# Published release artifacts. Written by the Releases module.
# Safe to edit: it is only rewritten when the file is missing or empty.

# No directory listings
Options -Indexes

# Never execute anything in this tree
<IfModule mod_php.c>
    php_flag engine off
</IfModule>
<IfModule mod_php7.c>
    php_flag engine off
</IfModule>
<IfModule mod_php8.c>
    php_flag engine off
</IfModule>

# Refuse server-parsed and executable types. HTML is allowed on
# purpose: a release may ship a changelog beside its ZIP.
<FilesMatch "\.(php|php[0-9]|phtml|phps|phar|pht|inc|shtml|shtm|asp|aspx|jsp|jspx|cgi|pl|py|rb|sh|bash|lua|exe|dll|so|bat|cmd|com|scr|msi|vbs|htaccess|htpasswd)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>

# Strip any handler that might be inherited
<IfModule mod_mime.c>
    RemoveHandler .php .php3 .php4 .php5 .php7 .php8 .phtml .phps .pht .cgi .pl .py .rb .sh .shtml
    RemoveType .php .php3 .php4 .php5 .php7 .php8 .phtml .phps .pht
    AddType text/plain .php .php3 .php4 .php5 .php7 .php8 .phtml .phps .pht
</IfModule>

# Serve artifacts as inert downloads
<IfModule mod_headers.c>
    Header always set X-Content-Type-Options "nosniff"
</IfModule>
