From bbc20ab7899de91ff17e2766812ab4e51d241705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Mon, 22 Jan 2024 09:58:51 +0000 Subject: [PATCH] chore: Additional logging of CORS errors [skip pizza] (#2687) --- api.planx.uk/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.planx.uk/server.ts b/api.planx.uk/server.ts index 78af294e10..ee394f463b 100644 --- a/api.planx.uk/server.ts +++ b/api.planx.uk/server.ts @@ -52,7 +52,7 @@ const checkAllowedOrigins: CorsOptions["origin"] = (origin, callback) => { isTest || isDevelopment || isAllowed || isMapDocs ? callback(null, true) - : callback(new Error("Not allowed by CORS")); + : callback(new Error(`Not allowed by CORS. Origin: ${origin}`)); }; app.use(