From 469f9e89336ecddf63f6aebd59014cec08409320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 1 Oct 2023 16:07:42 +0200 Subject: [PATCH] Do not redirect missing API prefixed routes to a localized version --- config/routes.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/routes.yaml b/config/routes.yaml index 2da939a1..8b38fa71 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -15,5 +15,5 @@ redirector: requirements: url: ".*" controller: App\Controller\RedirectController::addLocalePart - # Dont match localized routes (no redirection loop, if no root with that name exists) - condition: "not (request.getPathInfo() matches '/^\\\\/[a-z]{2}(_[A-Z]{2})?\\\\//')" \ No newline at end of file + # Dont match localized routes (no redirection loop, if no root with that name exists) or API prefixed routes + condition: "not (request.getPathInfo() matches '/^\\\\/([a-z]{2}(_[A-Z]{2})?|api)\\\\//')" \ No newline at end of file