scheme from conf
This commit is contained in:
@@ -345,11 +345,12 @@ func (s *Server) Home(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.Header().Set("Content-Type", "text/html")
|
w.Header().Set("Content-Type", "text/html")
|
||||||
|
|
||||||
if err := tmpl.Execute(w, map[string]any{
|
if err := tmpl.Execute(w, map[string]any{
|
||||||
"routePrefixes": routePrefixes,
|
"routePrefixes": routePrefixes,
|
||||||
"domain": r.Host,
|
"domain": r.Host,
|
||||||
"baseDomain": strings.Join(strings.Split(r.Host, ".")[1:], "."),
|
"baseDomain": strings.Join(strings.Split(r.Host, ".")[1:], "."),
|
||||||
"scheme": r.URL.Scheme,
|
"scheme": getScheme().String(),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user