We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69b3928 commit 04ce2afCopy full SHA for 04ce2af
1 file changed
main.go
@@ -27,8 +27,15 @@ func main() {
27
panic(err)
28
}
29
30
+ // Generate Network check
31
+ networkMask := "172.30.32.0/23"
32
+ if env := os.Getenv("NETWORK_MASK"); env != "" {
33
+ networkMask = env
34
+ }
35
+ _, hassioNetwork, _ = net.ParseCIDR(networkMask)
36
+
37
+ // system settings
38
apiKey = os.Getenv("SUPERVISOR_TOKEN")
- _, hassioNetwork, _ = net.ParseCIDR("172.30.32.0/23")
39
development = (os.Getenv("DEVELOPMENT") == "True")
40
httpClient = http.Client{Timeout: 3 * time.Second}
41
@@ -40,6 +47,7 @@ func main() {
47
48
indexTemplate = template.Must(template.ParseFiles(wwwRoot + "/index.html"))
42
49
50
+ // API setup
43
51
http.HandleFunc("/", statusIndex)
44
52
http.HandleFunc("/ping", apiPing)
45
53
http.HandleFunc("/logs", apiLogs)
0 commit comments