From 1bd63fc0878602e68e9bc445b20fd1e4034a1d46 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 31 Dec 2023 14:39:16 +0100 Subject: [PATCH] Add bounce script --- scripts/hetzner/config/Caddyfile | 6 ++++++ scripts/legacyRedirector.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/hetzner/config/Caddyfile b/scripts/hetzner/config/Caddyfile index 139a80186..08358e9bd 100644 --- a/scripts/hetzner/config/Caddyfile +++ b/scripts/hetzner/config/Caddyfile @@ -28,3 +28,9 @@ studio.mapcomplete.org { to http://127.0.0.1:1235 } } + +bounce.mapcomplete.org { + reverse_proxy { + to http://127.0.0.1:1236 + } +} diff --git a/scripts/legacyRedirector.ts b/scripts/legacyRedirector.ts index 06b29df71..de96a97c6 100644 --- a/scripts/legacyRedirector.ts +++ b/scripts/legacyRedirector.ts @@ -4,7 +4,7 @@ import * as http from "node:http" * Redirect people from * "mapcomplete.osm.be/path?query=parameter#id" to "mapcomplete.org/path?query=parameter#id" */ -const PORT = 8080 +const PORT = 1236 const CORS = "http://localhost:1234,https://mapcomplete.org,https://dev.mapcomplete.org" async function redirect(req: http.IncomingMessage, res: http.ServerResponse) {