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 73fafd8 commit c6280e4Copy full SHA for c6280e4
main.go
@@ -8,6 +8,7 @@ import (
8
"net/http"
9
"os"
10
"os/signal"
11
+ "path"
12
"path/filepath"
13
"sync"
14
"time"
@@ -183,6 +184,12 @@ func main() {
183
184
},
185
}, s.GetPodDefaults)).Methods("GET")
186
187
+ // Return the index.html page when a request for the new page is received directly.
188
+ router.Path("/new").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
189
+ http.ServeFile(w, r, path.Join(staticDirectory, "index.html"))
190
+ })
191
+
192
+ // Serve the rest of the routes from the static directory.
193
router.PathPrefix("/").Handler(http.FileServer(http.Dir(staticDirectory)))
194
195
// Setup the server, with:
0 commit comments