gitlab-org--gitlab-foss/lib/gitlab/middleware/read_only.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
434 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
module Gitlab
module Middleware
class ReadOnly
2019-05-05 10:19:14 +00:00
API_VERSIONS = (3..4).freeze
def self.internal_routes
@internal_routes ||=
API_VERSIONS.map { |version| "api/v#{version}/internal" }
end
def initialize(app)
@app = app
end
def call(env)
::Gitlab::Middleware::ReadOnly::Controller.new(@app, env).call
end
end
end
end