only match v0 immediately following api/ in the path

This commit is contained in:
Andy Brett
2021-03-06 14:11:19 -08:00
parent ef38abed28
commit 0b9c62284a

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: /(?!v0).+/ }
end
end