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..91624db7 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