[Fixed] compatible cfw
This commit is contained in:
parent
89609cc4a2
commit
a832cfdb65
2 changed files with 17 additions and 0 deletions
16
hub/route/script.go
Normal file
16
hub/route/script.go
Normal 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)
|
||||||
|
}
|
|
@ -72,6 +72,7 @@ func Start(addr string, secret string) {
|
||||||
r.Mount("/connections", connectionRouter())
|
r.Mount("/connections", connectionRouter())
|
||||||
r.Mount("/providers/proxies", proxyProviderRouter())
|
r.Mount("/providers/proxies", proxyProviderRouter())
|
||||||
r.Mount("/providers/rules", ruleProviderRouter())
|
r.Mount("/providers/rules", ruleProviderRouter())
|
||||||
|
r.Mount("/script", scriptRouter())
|
||||||
})
|
})
|
||||||
|
|
||||||
if uiPath != "" {
|
if uiPath != "" {
|
||||||
|
|
Loading…
Reference in a new issue