From 263cefccce84cd6bbd10a88d06cf3feb1707562d Mon Sep 17 00:00:00 2001 From: Benjamin Becquet Date: Tue, 16 Mar 2021 14:01:29 +0100 Subject: [PATCH] [Bug] Fix start POI always in EN when coming from IA (#1041) --- bin/middlewares/og_meta.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/middlewares/og_meta.js b/bin/middlewares/og_meta.js index 6c08ec090..12e57cd8d 100644 --- a/bin/middlewares/og_meta.js +++ b/bin/middlewares/og_meta.js @@ -75,7 +75,7 @@ module.exports = function(config) { } return function(req, res, next) { - const placeUrlMatch = req.originalUrl.match(/place\/(.*)/); + const placeUrlMatch = req.originalUrl.split('?')[0].match(/place\/(.*)/); const locale = res.locals.language; let poiId; if (placeUrlMatch && placeUrlMatch.length > 0) {