From bf351291a398dff8b95c770382956b5064cf1740 Mon Sep 17 00:00:00 2001 From: moustachu Date: Fri, 3 Jul 2026 15:31:28 +0200 Subject: [PATCH] Add redirects for API routes to 404 Redirect API routes to 404 page. --- config/routes.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/routes.rb b/config/routes.rb index d2cfbc34d9..2616f0f04a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,6 +15,10 @@ to: "decidim/devise/sessions#destroy" end + match "/api", to: redirect("/404"), via: :all + match "/api/graphiql", to: redirect("/404"), via: :all + match "/api/docs", to: redirect("/404"), via: :all + mount Decidim::Core::Engine => "/" # mount Decidim::Map::Engine => '/map' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html