removed config endpoint from ws
This commit is contained in:
parent
8bbe53d46c
commit
10394489cc
@ -27,8 +27,7 @@ func RunServer(cfg *config.Config) (err error) {
|
||||
e.HideBanner = cfg.Options.HideBanner
|
||||
|
||||
e.GET("/", func(c echo.Context) error {
|
||||
username := c.Get("username")
|
||||
return c.String(http.StatusOK, fmt.Sprintf("username: %s", username))
|
||||
return c.String(http.StatusOK, "Welcome to PKI software")
|
||||
})
|
||||
e.GET("/domain/:domain", func(c echo.Context) (err error) {
|
||||
var result EntryResponse
|
||||
@ -39,12 +38,6 @@ func RunServer(cfg *config.Config) (err error) {
|
||||
}
|
||||
return c.JSON(http.StatusOK, result)
|
||||
})
|
||||
e.GET("/config", func(c echo.Context) (err error) {
|
||||
if ConfigAccess(*cfg, c.RealIP()) {
|
||||
return c.JSON(http.StatusOK, cfg)
|
||||
}
|
||||
return c.String(http.StatusForbidden, "Forbidden")
|
||||
})
|
||||
|
||||
e.Logger.Fatal(e.Start(fmt.Sprintf(":%d", cfg.Switchs.Port)))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user