blob: f400d722e7612c545092539673ccbdbf7cf65455 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# frozen_string_literal: true
constraints(::Constraints::ActivityPubConstrainer.new) do
scope(module: 'activity_pub') do
constraints(::Constraints::ProjectUrlConstrainer.new) do
# Emulating route structure from routes/project.rb since we want to serve
# ActivityPub content with the proper "Accept" header to the same urls. See
# project routes file for rational behind this structure.
scope(
path: '*namespace_id',
as: :namespace,
namespace_id: Gitlab::PathRegex.full_namespace_route_regex
) do
scope(
path: ':project_id',
constraints: { project_id: Gitlab::PathRegex.project_route_regex },
module: :projects,
as: :project
) do
scope '-' do
resources :releases, only: :index do
collection do
get 'outbox'
end
end
end
end
end
end
end
end
|