From fa223479e489178b786fd123683dbe277720ebfb Mon Sep 17 00:00:00 2001 From: ionous Date: Thu, 7 May 2026 20:44:23 -0700 Subject: [PATCH 1/2] theoretical redirect for special campaign urls --- netlify.toml | 7 +++++++ services/nginx/conf.d/shift.conf | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/netlify.toml b/netlify.toml index 34a93129..8422cd69 100644 --- a/netlify.toml +++ b/netlify.toml @@ -111,6 +111,13 @@ status = 200 force = true +## campaign urls for logging to datad +[[redirects]] + from = "/campaigns/" + to = "https://api.shift2bikes.org/api/campaigns" + status = 200 + force = true + ## --------------------------------------------------------------------------- ## legacy links ## --------------------------------------------------------------------------- diff --git a/services/nginx/conf.d/shift.conf b/services/nginx/conf.d/shift.conf index da6549ed..f3031756 100644 --- a/services/nginx/conf.d/shift.conf +++ b/services/nginx/conf.d/shift.conf @@ -23,6 +23,15 @@ server { # and to be a little forgiving generally. client_max_body_size 5250k; + # ----------------------------------------------- + # special end point which exists to record into datadog + # simply redirects back to the main page + # ----------------------------------------------- + + location = /api/campaigns { + return 301 https://shift2bikes.org/; + } + # ----------------------------------------------- # node endpoints # note: these uses "http://node" because the docker containers From 866f64bd0a4dea921fedfc58380fd4f207076c52 Mon Sep 17 00:00:00 2001 From: ionous Date: Thu, 7 May 2026 21:02:42 -0700 Subject: [PATCH 2/2] allow slash no slash sub urls etc --- services/nginx/conf.d/shift.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/nginx/conf.d/shift.conf b/services/nginx/conf.d/shift.conf index f3031756..91624db7 100644 --- a/services/nginx/conf.d/shift.conf +++ b/services/nginx/conf.d/shift.conf @@ -28,7 +28,7 @@ server { # simply redirects back to the main page # ----------------------------------------------- - location = /api/campaigns { + location ^~ /api/campaigns { return 301 https://shift2bikes.org/; }