diff --git a/hub/route/script.go b/hub/route/script.go new file mode 100644 index 00000000..fc1f791d --- /dev/null +++ b/hub/route/script.go @@ -0,0 +1,16 @@ +package route + +import ( + "github.com/go-chi/chi/v5" + "net/http" +) + +func scriptRouter() http.Handler { + r := chi.NewRouter() + r.Get("/", getScript) + return r +} + +func getScript(writer http.ResponseWriter, request *http.Request) { + writer.WriteHeader(http.StatusMethodNotAllowed) +} diff --git a/hub/route/server.go b/hub/route/server.go index 402ba666..b657128e 100644 --- a/hub/route/server.go +++ b/hub/route/server.go @@ -72,6 +72,7 @@ func Start(addr string, secret string) { r.Mount("/connections", connectionRouter()) r.Mount("/providers/proxies", proxyProviderRouter()) r.Mount("/providers/rules", ruleProviderRouter()) + r.Mount("/script", scriptRouter()) }) if uiPath != "" {