Skip to content
Snippets Groups Projects
Commit e4b485ca authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

ngrok switched domain

parent 4596c2d5
No related branches found
No related tags found
No related merge requests found
...@@ -105,13 +105,13 @@ app.use((req, res, next) => { ...@@ -105,13 +105,13 @@ app.use((req, res, next) => {
if ( if (
allowed_hosts.includes(req.hostname) || allowed_hosts.includes(req.hostname) ||
(process.env.NODE_ENV === "development" && (process.env.NODE_ENV === "development" &&
req.hostname.match(/^(localhost|.*\.ngrok\.io|.*\.review\.metager\.de)$/)) req.hostname.match(/^(localhost|.*\.ngrok-free\.app|.*\.review\.metager\.de)$/))
) { ) {
let proto = req.get("x-forwarded-proto") ?? req.protocol; let proto = req.get("x-forwarded-proto") ?? req.protocol;
let host = req.get("x-forwarded-host") ?? req.get("host"); let host = req.get("x-forwarded-host") ?? req.get("host");
let port = req.get("x-forwarded-port"); let port = req.get("x-forwarded-port");
if (host.match(/^.*\.ngrok\.io$/)) { if (host.match(/^.*\.ngrok-free\.app$/)) {
proto = "https"; proto = "https";
port = undefined; port = undefined;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment