From 51d075166ae5d092392666f16e576d5e5a55943d Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Sat, 6 Mar 2021 14:14:13 -0800 Subject: [PATCH] match any API version --- config/routes/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes/api.rb b/config/routes/api.rb index c919378aa2..69f41549f2 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -79,6 +79,6 @@ Openfoodnetwork::Application.routes.draw do end end - match '*path', to: redirect(path: "/api/v0/%{path}"), via: :all, constraints: { path: /(?!v0).+/ } + match '*path', to: redirect(path: "/api/v0/%{path}"), via: :all, constraints: { path: /(?!v[0-9]).+/ } end end