Commit 8b39e1f4 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Build path to index.html only once

parent c5664cdf
......@@ -8,8 +8,9 @@ import (
)
func handleDeployPage(documentRoot string, handler http.Handler) http.HandlerFunc {
deployPage := filepath.Join(documentRoot, "index.html")
return func(w http.ResponseWriter, r *http.Request) {
deployPage := filepath.Join(documentRoot, "index.html")
data, err := ioutil.ReadFile(deployPage)
if err != nil {
handler.ServeHTTP(w, r)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment