diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0ecd77..1ac22d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,7 @@ collation = "utf8mb4_0900_ai_ci" [General] + force_ssl = 1 proxy_client_headers[] = "HTTP_X_FORWARDED_FOR" proxy_host_headers[] = "HTTP_X_FORWARDED_HOST" salt = "${APP_MATOMO_SALT}" diff --git a/Dockerfile b/Dockerfile index c9261a4..4549db4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,11 @@ USER ${USER} COPY --chown=${USER}:${USER} ./config/config.ini.php /var/www/html/config/config.ini.php -RUN printf "RewriteEngine On\nRewriteRule ^unicorn$ matomo.js [L]\nRewriteRule ^rainbow$ matomo.php [L]\n" > /var/www/html/.htaccess \ No newline at end of file +RUN printf "Options +FollowSymLinks\n\ + RewriteEngine On\n\ + # Block sensitive dirs\n\ + RewriteRule ^\.git(/|$) - [F,L]\n\ + RewriteRule ^(core|config|lang|tmp)(/|$) - [F,L]\n\ + # Existing rules\n\ + RewriteRule ^unicorn$ matomo.js [L]\n\ + RewriteRule ^rainbow$ matomo.php [L]\n" > /var/www/html/.htaccess