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
96644523
Commit
96644523
authored
Jan 29, 2019
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Count ^/-/ separately in prometheus
parent
ff2634a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
internal/upstream/routes.go
internal/upstream/routes.go
+11
-9
No files found.
internal/upstream/routes.go
View file @
96644523
...
@@ -168,6 +168,13 @@ func (u *upstream) configureRoutes() {
...
@@ -168,6 +168,13 @@ func (u *upstream) configureRoutes() {
ciAPIProxyQueue
:=
queueing
.
QueueRequests
(
"ci_api_job_requests"
,
uploadAccelerateProxy
,
u
.
APILimit
,
u
.
APIQueueLimit
,
u
.
APIQueueTimeout
)
ciAPIProxyQueue
:=
queueing
.
QueueRequests
(
"ci_api_job_requests"
,
uploadAccelerateProxy
,
u
.
APILimit
,
u
.
APIQueueLimit
,
u
.
APIQueueTimeout
)
ciAPILongPolling
:=
builds
.
RegisterHandler
(
ciAPIProxyQueue
,
redis
.
WatchKey
,
u
.
APICILongPollingDuration
)
ciAPILongPolling
:=
builds
.
RegisterHandler
(
ciAPIProxyQueue
,
redis
.
WatchKey
,
u
.
APICILongPollingDuration
)
// Serve static files or forward the requests
defaultUpstream
:=
static
.
ServeExisting
(
u
.
URLPrefix
,
staticpages
.
CacheDisabled
,
static
.
DeployPage
(
static
.
ErrorPagesUnless
(
u
.
DevelopmentMode
,
uploadAccelerateProxy
)),
)
u
.
Routes
=
[]
routeEntry
{
u
.
Routes
=
[]
routeEntry
{
// Git Clone
// Git Clone
route
(
"GET"
,
gitProjectPattern
+
`info/refs\z`
,
git
.
GetInfoRefsHandler
(
api
)),
route
(
"GET"
,
gitProjectPattern
+
`info/refs\z`
,
git
.
GetInfoRefsHandler
(
api
)),
...
@@ -214,15 +221,10 @@ func (u *upstream) configureRoutes() {
...
@@ -214,15 +221,10 @@ func (u *upstream) configureRoutes() {
// through static.ServeExisting.
// through static.ServeExisting.
route
(
""
,
`^/uploads/`
,
static
.
ErrorPagesUnless
(
u
.
DevelopmentMode
,
proxy
)),
route
(
""
,
`^/uploads/`
,
static
.
ErrorPagesUnless
(
u
.
DevelopmentMode
,
proxy
)),
// Serve static files or forward the requests
// This route lets us filter out health checks from our metrics.
route
(
route
(
""
,
"^/-/"
,
defaultUpstream
),
""
,
""
,
static
.
ServeExisting
(
route
(
""
,
""
,
defaultUpstream
),
u
.
URLPrefix
,
staticpages
.
CacheDisabled
,
static
.
DeployPage
(
static
.
ErrorPagesUnless
(
u
.
DevelopmentMode
,
uploadAccelerateProxy
)),
),
),
}
}
}
}
...
...
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