We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d646d8 commit 8f76497Copy full SHA for 8f76497
src/vhostHandler/main.go
@@ -8,6 +8,7 @@ import (
8
"../tpl"
9
"../user"
10
"net/http"
11
+ "os"
12
)
13
14
type VhostHandler struct {
@@ -49,8 +50,12 @@ func NewHandler(
49
50
_, hasRootAlias := aliases["/"]
51
emptyRoot := false
52
if !hasRootAlias {
- aliases["/"] = p.Root
53
emptyRoot = p.EmptyRoot
54
+ if emptyRoot {
55
+ aliases["/"] = os.DevNull
56
+ } else {
57
+ aliases["/"] = p.Root
58
+ }
59
}
60
61
handlers := map[string]http.Handler{}
0 commit comments