Commit 9812f90b authored by Matthias Käppler's avatar Matthias Käppler

Merge branch '33585_skip_format_for_unmatched_route' into 'master'

Ignore format of unmatched route

See merge request gitlab-org/gitlab!83523
parents 84a4618e 9a14f547
......@@ -325,7 +325,7 @@ Rails.application.routes.draw do
root to: "root#index"
get '*unmatched_route', to: 'application#route_not_found'
get '*unmatched_route', to: 'application#route_not_found', format: false
end
Gitlab::Routing.add_helpers(TimeboxesRoutingHelper)
......@@ -905,6 +905,13 @@ RSpec.describe 'project routing' do
)
end
it 'routes to 404 without format for invalid page' do
expect(get: "/gitlab/gitlabhq/-/metrics/invalid_page.md").to route_to(
'application#route_not_found',
unmatched_route: 'gitlab/gitlabhq/-/metrics/invalid_page.md'
)
end
it 'routes to 404 with invalid dashboard_path' do
expect(get: "/gitlab/gitlabhq/-/metrics/invalid_dashboard").to route_to(
'application#route_not_found',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment