Add bounce script

This commit is contained in:
Pieter Vander Vennet 2023-12-31 14:39:16 +01:00
parent a2fbc45b8f
commit 1bd63fc087
2 changed files with 7 additions and 1 deletions

View file

@ -28,3 +28,9 @@ studio.mapcomplete.org {
to http://127.0.0.1:1235 to http://127.0.0.1:1235
} }
} }
bounce.mapcomplete.org {
reverse_proxy {
to http://127.0.0.1:1236
}
}

View file

@ -4,7 +4,7 @@ import * as http from "node:http"
* Redirect people from * Redirect people from
* "mapcomplete.osm.be/path?query=parameter#id" to "mapcomplete.org/path?query=parameter#id" * "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" const CORS = "http://localhost:1234,https://mapcomplete.org,https://dev.mapcomplete.org"
async function redirect(req: http.IncomingMessage, res: http.ServerResponse) { async function redirect(req: http.IncomingMessage, res: http.ServerResponse) {