diff --git a/config/routes.rb b/config/routes.rb
index e2e97b46d23114b31e5fd601a4f1ea59cfdc1425..1242bbbf9326701f158b681db81823714871565f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -31,7 +31,7 @@ Rails.application.routes.draw do
   # Having a non-existent controller here does not affect the scope in any way since all possible routes
   # get a 404 proc returned. It is written in this way to minimize merge conflicts with EE
   scope path: '/login/oauth', controller: 'oauth/jira/authorizations', as: :oauth_jira do
-    match ':action', via: [:get, :post], to: proc { [404, {}, ['']] }
+    match '*all', via: [:get, :post], to: proc { [404, {}, ['']] }
   end
 
   use_doorkeeper_openid_connect
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 4021d62b9316cc922ba7a439e586ae21ae49c0ab..8a5310b5c23a8ec82d9a1291e3d54e99fe9990b9 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -145,7 +145,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
         end
       end
 
-      controller 'merge_requests/creations', path: 'merge_requests' do
+      scope path: 'merge_requests', controller: 'merge_requests/creations' do
         post '', action: :create, as: nil
 
         scope path: 'new', as: :new_merge_request do