From 9e03e882169e087c9004b93286ce58f4be42b8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 May 2021 13:02:33 +0200 Subject: [PATCH 1/2] Update nginx.conf (#42) * Update nginx.conf --- conf/nginx.conf | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index b41ead3..d16f443 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -26,6 +26,44 @@ location __PATH__/ { fastcgi_param SCRIPT_FILENAME $request_filename; } + + ## deny access to all other .php files + location ~* ^.+\.php$ { + deny all; + return 403; + } + + + ## disable all access to the following directories + location ~ ^/(config|tmp|core|lang) { + deny all; + return 403; # replace with 404 to not show these directories exist + } + + location ~ js/container_.*_preview\.js$ { + expires off; + more_set_headers "Cache-Control: private, no-cache, no-store"; + } + + location ~ \.(gif|ico|jpg|png|svg|js|css|htm|html|mp3|mp4|wav|ogg|avi|ttf|eot|woff|woff2|json)$ { + allow all; + ## Cache images,CSS,JS and webfonts for an hour + ## Increasing the duration may improve the load-time, but may cause old files to show after an Matomo upgrade + expires 1h; + more_set_headers "Cache-Control: public"; + more_set_headers "Pragma: public"; + } + + location __PATH__/(libs|vendor|plugins|misc|node_modules) { + deny all; + return 403; + } + + ## properly display textfiles in root directory + location ~/(.*\.md|LEGALNOTICE|LICENSE) { + default_type text/plain; + } + # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } From 4835460616468c063c05479458b8a1adc7d079d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 May 2021 13:03:10 +0200 Subject: [PATCH 2/2] Upgrade to 4.3.0 (#44) * Upgrade to 4.3.0 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/change_url | 8 -------- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 59c3c67..117f0c1 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/inst ## Overview Matomo is the leading Free/Libre open analytics platform. It is a full-featured PHP MySQL software program that you download and install on your own webserver. At the end of the five-minute installation process, you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real-time. -**Shipped version:** 4.2.1 +**Shipped version:** 4.3.0 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 3209e87..026f861 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) ## Vue d'ensemble Matomo est une plateforme d'analyse open source de mesure de statistiques Web. Il s'agit d'un logiciel PHP MySQL complet que vous téléchargez et installez sur votre propre serveur Web. À la fin du processus d'installation de cinq minutes, vous recevrez un code JavaScript. Copiez et collez simplement cette balise sur les sites Web que vous souhaitez suivre et accédez à vos rapports d'analyse en temps réel. -**Version incluse :** 4.2.1 +**Version incluse :** 4.3.0 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 4ac6a9a..a854ead 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/matomo-org/matomo/archive/4.2.1.tar.gz -SOURCE_SUM=e84b86186ef0924b4d4479ec3162bbc9cb30e430b3a55a7f6d8a08e84704b33f +SOURCE_URL=https://github.com/matomo-org/matomo/archive/refs/tags/4.3.0-rc1.tar.gz +SOURCE_SUM=af0951e086a4ac0f3fdc63fbe0d809dd202e47f36c735358ab20bc7479d36b87 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 48e1218..ad58315 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.2.1~ynh2", + "version": "4.3.0~ynh1", "url": "https://matomo.org", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/scripts/change_url b/scripts/change_url index f21a608..49138df 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -97,18 +97,10 @@ fi #================================================= ynh_script_progression --message="Setuping a cron..." -#cp ../conf/cron /etc/cron.d/$app - path=$new_path domain=$new_domain ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -# ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="/etc/cron.d/$app" -# ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/etc/cron.d/$app" -# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="/etc/cron.d/$app" -# ynh_replace_string --match_string="__PATH__" --replace_string="$new_path" --target_file="/etc/cron.d/$app" -# ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="/etc/cron.d/$app" - #================================================= # RELOAD NGINX #=================================================