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
0
Merge Requests
0
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
iv
gitlab-workhorse
Commits
e4569081
Commit
e4569081
authored
Dec 20, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary function
parent
d55aa579
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
internal/upstream/upstream.go
internal/upstream/upstream.go
+12
-12
No files found.
internal/upstream/upstream.go
View file @
e4569081
...
...
@@ -39,19 +39,18 @@ type Upstream struct {
}
func
(
u
*
Upstream
)
URLPrefix
()
urlprefix
.
Prefix
{
u
.
configureURLPrefixOnce
.
Do
(
u
.
configureURLPrefix
)
return
u
.
urlPrefix
}
u
.
configureURLPrefixOnce
.
Do
(
func
()
{
if
u
.
Backend
==
nil
{
u
.
Backend
=
DefaultBackend
}
relativeURLRoot
:=
u
.
Backend
.
Path
if
!
strings
.
HasSuffix
(
relativeURLRoot
,
"/"
)
{
relativeURLRoot
+=
"/"
}
u
.
urlPrefix
=
urlprefix
.
Prefix
(
relativeURLRoot
)
})
func
(
u
*
Upstream
)
configureURLPrefix
()
{
if
u
.
Backend
==
nil
{
u
.
Backend
=
DefaultBackend
}
relativeURLRoot
:=
u
.
Backend
.
Path
if
!
strings
.
HasSuffix
(
relativeURLRoot
,
"/"
)
{
relativeURLRoot
+=
"/"
}
u
.
urlPrefix
=
urlprefix
.
Prefix
(
relativeURLRoot
)
return
u
.
urlPrefix
}
func
(
u
*
Upstream
)
RoundTripper
()
*
badgateway
.
RoundTripper
{
...
...
@@ -61,6 +60,7 @@ func (u *Upstream) RoundTripper() *badgateway.RoundTripper {
ResponseHeaderTimeout
:
u
.
ResponseHeaderTimeout
,
}
})
return
u
.
roundtripper
}
...
...
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