Skip to content
Snippets Groups Projects

Fix constrainers for relative url

Merged Dmytro Zaporozhets (DZ) requested to merge dz-fix-constrainer-for-relative-url into master
1 unresolved thread

What does this MR do?

Sub relative url from request path in routing constrainer

Why was this MR needed?

To prevent 404 when visit group page when GitLab setup configured for relative url

What are the relevant issue numbers?

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23675

Merge request reports

Pipeline #4723453 passed with warnings

Pipeline passed with warnings for ccd81a87 on dz-fix-constrainer-for-relative-url

Test coverage 90.39% from 1 job

Merged by avatar (Apr 19, 2025 11:07pm UTC)

Loading

Pipeline #4724812 canceled

Pipeline canceled for f2644adf on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
17 17 it { expect(subject.matches?(request '/g/gitlab')).to be_falsey }
18 18 it { expect(subject.matches?(request '/.gitlab')).to be_falsey }
19 19 end
20
21 context 'relative url' do
22 before do
23 allow(Gitlab::Application.config).to receive(:relative_url_root) { '/gitlab' }
24 end
25
26 it { expect(subject.matches?(request '/gitlab/gitlab')).to be_truthy }
  • Sean McGivern Status changed to merged

    Status changed to merged

  • Sean McGivern Mentioned in commit f2644adf

    Mentioned in commit f2644adf

  • Mentioned in issue #23728 (closed)

  • Mentioned in issue #23656 (closed)

  • Picked into 8-13-stable, will go into 8.13.1.

  • Rémy Coutable Removed ~149423 label

    Removed ~149423 label

  • Reassigned to @smcgivern

  • Sean McGivern Mentioned in commit 6d84f057

    Mentioned in commit 6d84f057

  • Please register or sign in to reply
    Loading