added support for listening on unix socket #4030 (#8221)

This commit is contained in:
Mitja Z
2017-04-27 08:54:21 +02:00
committed by Torkel Ödegaard
parent d4f7a2bc99
commit c92d719a72
4 changed files with 28 additions and 3 deletions
+6
View File
@@ -27,6 +27,7 @@ type Scheme string
const (
HTTP Scheme = "http"
HTTPS Scheme = "https"
SOCKET Scheme = "socket"
DEFAULT_HTTP_ADDR string = "0.0.0.0"
)
@@ -65,6 +66,7 @@ var (
HttpAddr, HttpPort string
SshPort int
CertFile, KeyFile string
SocketPath string
RouterLogging bool
DataProxyLogging bool
StaticRootPath string
@@ -473,6 +475,10 @@ func NewConfigContext(args *CommandLineArgs) error {
CertFile = server.Key("cert_file").String()
KeyFile = server.Key("cert_key").String()
}
if server.Key("protocol").MustString("http") == "socket" {
Protocol = SOCKET
SocketPath = server.Key("socket").String()
}
Domain = server.Key("domain").MustString("localhost")
HttpAddr = server.Key("http_addr").MustString(DEFAULT_HTTP_ADDR)