Commit d3bca376 authored by Ryan Cobb's avatar Ryan Cobb

Add basic proxy for customers dot

parent 761a8b63
# frozen_string_literal: true
module CustomersDot
class ProxyController < ApplicationController
skip_before_action :authenticate_user!
skip_before_action :verify_authenticity_token
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
......@@ -284,6 +284,7 @@ Rails.application.routes.draw do
draw :git_http
draw :api
draw :customers_dot
draw :sidekiq
draw :help
draw :google_api
......
# frozen_string_literal: true
namespace :customers_dot do
post 'proxy/graphql' => 'proxy#graphql'
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment