diff --git a/src/cmd/server/handler/handler.go b/src/cmd/server/handler/handler.go
index 41018b8..1d5ffd0 100644
--- a/src/cmd/server/handler/handler.go
+++ b/src/cmd/server/handler/handler.go
@@ -3,6 +3,7 @@ package handler
import (
"context"
"net/http"
+ "strings"
)
type Handler struct {
@@ -20,10 +21,11 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
func (h Handler) serveHTTP(w http.ResponseWriter, r *http.Request) error {
- switch r.URL.Path {
- case "/v1/vpntor":
+ if strings.HasPrefix(r.URL.Path, "/v1/vpntor") {
return h.vpntor(r.Context(), r.Body)
- default:
+ } else if strings.HasPrefix(r.URL.Path, "/experimental/ui") {
+ return h.ui(w, r)
+ } else {
http.NotFound(w, r)
}
return nil
diff --git a/src/cmd/server/handler/testdata/index.html b/src/cmd/server/handler/testdata/index.html
new file mode 100644
index 0000000..65ee7da
--- /dev/null
+++ b/src/cmd/server/handler/testdata/index.html
@@ -0,0 +1,9 @@
+
+