mirror of
https://github.com/caddyserver/caddy.git
synced 2025-02-22 01:06:41 +08:00
Merge pull request #105 from abiosoft/master
FastCGI: allow "unix:" prefix for unix sockets.
This commit is contained in:
commit
6080c4fab1
@ -61,7 +61,10 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
|
||||
var fcgi *FCGIClient
|
||||
|
||||
// check if unix socket or tcp
|
||||
if strings.HasPrefix(rule.Address, "/") {
|
||||
if strings.HasPrefix(rule.Address, "/") || strings.HasPrefix(rule.Address, "unix:") {
|
||||
if strings.HasPrefix(rule.Address, "unix:") {
|
||||
rule.Address = rule.Address[len("unix:"):]
|
||||
}
|
||||
fcgi, err = Dial("unix", rule.Address)
|
||||
} else {
|
||||
fcgi, err = Dial("tcp", rule.Address)
|
||||
|
Loading…
x
Reference in New Issue
Block a user