From 65fae0b06aa22913ffaf2117048ef589950399be Mon Sep 17 00:00:00 2001 From: Lova ANDRIARIMALALA <43842786+Xpirix@users.noreply.github.com> Date: Fri, 6 Sep 2024 12:39:59 +0100 Subject: [PATCH] Add new rule for redirecting metabase --- dockerize/sites-enabled/prod-ssl.conf | 13 +++++++++++++ dockerize/sites-enabled/prod.conf | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/dockerize/sites-enabled/prod-ssl.conf b/dockerize/sites-enabled/prod-ssl.conf index 94ca5328..f3eeb44a 100644 --- a/dockerize/sites-enabled/prod-ssl.conf +++ b/dockerize/sites-enabled/prod-ssl.conf @@ -7,6 +7,19 @@ upstream uwsgi { # Define the rate limit zone: 10 requests per second for each IP address limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s; +# Redirect requests on analytics.qgis.org over to the feed +# This is just a conveneience in case we ever decide to host +# metabase on its own server. +# Note that we also have a cloudflare trasnform rule in place +# which will redirect users from analytics.qgis.org over to the public dashboard +# https://dash.cloudflare.com/a2cec2d89cc90579a20a30365bedcaf7/qgis.org/rules/transform-rules +server { + listen 80; + listen 443 ssl; + server_name plugins-analytics.qgis.org; + return 301 $scheme://plugins.qgis.org$request_uri; +} + server { # OTF gzip compression gzip on; diff --git a/dockerize/sites-enabled/prod.conf b/dockerize/sites-enabled/prod.conf index 1aa73956..16d387b9 100644 --- a/dockerize/sites-enabled/prod.conf +++ b/dockerize/sites-enabled/prod.conf @@ -7,6 +7,19 @@ upstream uwsgi { # Define the rate limit zone: 10 requests per second for each IP address limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s; +# Redirect requests on analytics.qgis.org over to the feed +# This is just a conveneience in case we ever decide to host +# metabase on its own server. +# Note that we also have a cloudflare trasnform rule in place +# which will redirect users from analytics.qgis.org over to the public dashboard +# https://dash.cloudflare.com/a2cec2d89cc90579a20a30365bedcaf7/qgis.org/rules/transform-rules +server { + listen 80; + listen 443 ssl; + server_name plugins-analytics.qgis.org; + return 301 $scheme://plugins.qgis.org$request_uri; +} + server { # OTF gzip compression gzip on;