Skip to content

Commit

Permalink
chore: Additional logging of CORS errors [skip pizza] (#2687)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Jan 22, 2024
1 parent 32326cf commit bbc20ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.planx.uk/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bbc20ab

Please sign in to comment.