Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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-workhorse
Commits
e6c8334d
Commit
e6c8334d
authored
Dec 07, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rate limit builds register
parent
eb451e03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
internal/upstream/routes.go
internal/upstream/routes.go
+6
-3
No files found.
internal/upstream/routes.go
View file @
e6c8334d
...
...
@@ -56,7 +56,7 @@ func (u *Upstream) configureRoutes() {
git
.
SendPatch
,
artifacts
.
SendEntry
,
)
api
ProxyQueue
:=
queueing
.
QueueRequests
(
proxy
,
u
.
APILimit
,
u
.
APIQueueLimit
,
u
.
APIQueueTimeout
)
ciAPI
ProxyQueue
:=
queueing
.
QueueRequests
(
proxy
,
u
.
APILimit
,
u
.
APIQueueLimit
,
u
.
APIQueueTimeout
)
u
.
Routes
=
[]
route
{
// Git Clone
...
...
@@ -68,9 +68,12 @@ func (u *Upstream) configureRoutes() {
// CI Artifacts
route
{
"POST"
,
regexp
.
MustCompile
(
ciAPIPattern
+
`v1/builds/[0-9]+/artifacts\z`
),
contentEncodingHandler
(
artifacts
.
UploadArtifacts
(
api
,
proxy
))},
// Limit capacity given to builds/register.json
route
{
""
,
regexp
.
MustCompile
(
ciAPIPattern
+
`v1/builds/register.json\z`
),
ciAPIProxyQueue
},
// Explicitly proxy API requests
route
{
""
,
regexp
.
MustCompile
(
apiPattern
),
apiProxyQueue
},
route
{
""
,
regexp
.
MustCompile
(
ciAPIPattern
),
apiProxyQueue
},
route
{
""
,
regexp
.
MustCompile
(
apiPattern
),
proxy
},
route
{
""
,
regexp
.
MustCompile
(
ciAPIPattern
),
proxy
},
// Serve assets
route
{
""
,
regexp
.
MustCompile
(
`^/assets/`
),
...
...
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