Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix routing error on css maps

Oliver Güntherc95753f187e4
diff --git a/config/routes.rb b/config/routes.rb
index 7a7665d1432..91f76b32431 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -55,7 +55,11 @@ Rails.application.routes.draw do
# Respond with 410 gone for APIV2 calls
match "/api/v2(/*unmatched_route)", to: proc { [410, {}, [""]] }, via: :all
+
+ # Respond with 404 for source maps that are not found
+ # This prevents routing errors in test when developer mode is activated
match "/assets/compiler.js.map", to: proc { [404, {}, [""]] }, via: :all
+ match "*.css.map", to: proc { [404, {}, [""]] }, via: :all
# Redirect wp short url for work packages to full URL
get "/wp(/)" => redirect("#{rails_relative_url_root}/work_packages")