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
b67e2dd2
Commit
b67e2dd2
authored
Jul 30, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support listening on Unix domain sockets
parent
e34d9bc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
main.go
main.go
+7
-1
No files found.
main.go
View file @
b67e2dd2
...
...
@@ -19,6 +19,7 @@ import (
"fmt"
"io"
"log"
"net"
"net/http"
"os"
"os/exec"
...
...
@@ -47,6 +48,7 @@ var pathTraversal = regexp.MustCompile(`/../`)
var
repoRoot
string
var
printVersion
=
flag
.
Bool
(
"version"
,
false
,
"Print version and exit"
)
var
listenAddr
=
flag
.
String
(
"listenAddr"
,
"localhost:8181"
,
"Listen address for HTTP server"
)
var
listenNetwork
=
flag
.
String
(
"listenNetwork"
,
"tcp"
,
"Listen 'network' (protocol)"
)
var
authBackend
=
flag
.
String
(
"authBackend"
,
"http://localhost:8080"
,
"Authentication/authorization backend"
)
var
gitServices
=
[
...
]
gitService
{
...
...
@@ -75,7 +77,11 @@ func main() {
log
.
Printf
(
"repoRoot: %s"
,
repoRoot
)
http
.
HandleFunc
(
"/"
,
gitHandler
)
log
.
Fatal
(
http
.
ListenAndServe
(
*
listenAddr
,
nil
))
listener
,
err
:=
net
.
Listen
(
*
listenNetwork
,
*
listenAddr
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
log
.
Fatal
(
http
.
Serve
(
listener
,
nil
))
}
func
gitHandler
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
...
...
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