mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-10 02:53:12 +00:00
24 lines
458 B
Go
24 lines
458 B
Go
package clashapi
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/go-chi/chi/v5"
|
|
"github.com/go-chi/render"
|
|
)
|
|
|
|
func cacheRouter() http.Handler {
|
|
r := chi.NewRouter()
|
|
r.Post("/fakeip/flush", flushFakeip)
|
|
return r
|
|
}
|
|
|
|
func flushFakeip(w http.ResponseWriter, r *http.Request) {
|
|
/*if err := cachefile.Cache().FlushFakeip(); err != nil {
|
|
render.Status(r, http.StatusInternalServerError)
|
|
render.JSON(w, r, newError(err.Error()))
|
|
return
|
|
}*/
|
|
render.NoContent(w, r)
|
|
}
|