debian-mirror-gitlab/lib/gitlab/middleware/read_only.rb

21 lines
396 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
module Gitlab
module Middleware
class ReadOnly
API_VERSIONS = (3..4)
2018-03-27 19:54:05 +05:30
def self.internal_routes
@internal_routes ||=
API_VERSIONS.map { |version| "api/v#{version}/internal" }
end
2018-03-17 18:26:18 +05:30
def initialize(app)
@app = app
end
def call(env)
2018-05-09 12:01:36 +05:30
::Gitlab::Middleware::ReadOnly::Controller.new(@app, env).call
2018-03-17 18:26:18 +05:30
end
end
end
end