match any API version

This commit is contained in:
Andy Brett
2021-03-06 14:14:13 -08:00
parent 0b9c62284a
commit 51d075166a

View File

@@ -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