Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d3bca376
Commit
d3bca376
authored
Mar 12, 2021
by
Ryan Cobb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic proxy for customers dot
parent
761a8b63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
app/controllers/customers_dot/proxy_controller.rb
app/controllers/customers_dot/proxy_controller.rb
+19
-0
config/routes.rb
config/routes.rb
+1
-0
config/routes/customers_dot.rb
config/routes/customers_dot.rb
+5
-0
No files found.
app/controllers/customers_dot/proxy_controller.rb
0 → 100644
View file @
d3bca376
# 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
config/routes.rb
View file @
d3bca376
...
...
@@ -284,6 +284,7 @@ Rails.application.routes.draw do
draw
:git_http
draw
:api
draw
:customers_dot
draw
:sidekiq
draw
:help
draw
:google_api
...
...
config/routes/customers_dot.rb
0 → 100644
View file @
d3bca376
# frozen_string_literal: true
namespace
:customers_dot
do
post
'proxy/graphql'
=>
'proxy#graphql'
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment