feat: enable Apache headers and rewrite module in Dockerfile; wrap header setting in .htaccess with IfModule check
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
RUN a2enmod headers rewrite
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql
|
||||
|
||||
COPY . /var/www/html/
|
||||
|
||||
@@ -9,5 +9,7 @@ Options -Indexes
|
||||
|
||||
# Mencegah MIME sniffing
|
||||
<FilesMatch "\.(jpg|jpeg|png)$">
|
||||
<IfModule mod_headers.c>
|
||||
Header set X-Content-Type-Options "nosniff"
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
Reference in New Issue
Block a user