Welcome to mirror list, hosted at ThFree Co, Russian Federation.

proxy_controller.rb « customers_dot « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5abf8a487c61c4f0e576ad8c2c40e58f0389ca83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module CustomersDot
  class ProxyController < ApplicationController
    skip_before_action :authenticate_user!
    skip_before_action :verify_authenticity_token

    feature_category :purchase

    BASE_URL = Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL

    def graphql
      response = Gitlab::HTTP.post("#{BASE_URL}/graphql",
        body: request.raw_post,
        headers: { 'Content-Type' => 'application/json' }
      )

      render json: response.body, status: response.code
    end
  end
end