removed config endpoint from ws
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paul 2020-11-30 23:22:57 +01:00
parent 8bbe53d46c
commit 10394489cc

View File

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