[Fixed] compatible cfw

This commit is contained in:
Skyxim 2022-01-05 19:28:54 +08:00
parent 89609cc4a2
commit a832cfdb65
2 changed files with 17 additions and 0 deletions

16
hub/route/script.go Normal file
View file

@ -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)
}

View file

@ -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 != "" {