diff --git a/api/config/config.go b/api/config/config.go index 5319703..1a83c4d 100644 --- a/api/config/config.go +++ b/api/config/config.go @@ -37,14 +37,14 @@ func (c *Type) Load() (err error) { // default options c.Options = []Option{ - {Name: "debug", Value: "false", Type: OPTION_TYPE_BOOL, Required: true}, // should display debug messgaes? - {Name: "app_url", Value: "http://localhost:7001/", Type: OPTION_TYPE_URL, Required: true}, // frontend application URL for the website - {Name: "password", Value: "", Type: OPTION_TYPE_STR, Required: true}, // admin password - {Name: "host", Value: "0.0.0.0:7002", Type: OPTION_TYPE_STR, Required: true}, // host the server should listen on - {Name: "ip_header", Value: "X-Real-IP", Type: OPTION_TYPE_STR, Required: false}, // header that should be checked for obtaining the client IP - {Name: "interval", Value: "1h", Type: OPTION_TYPE_STR, Required: false}, // service status check interval - {Name: "timeout", Value: "15s", Type: OPTION_TYPE_STR, Required: false}, // timeout for the service status check - {Name: "limit", Value: "5s", Type: OPTION_TYPE_STR, Required: false}, // if the service responds slower than this limit, it will be marked as "slow" + {Name: "debug", Value: "false", Type: OPTION_TYPE_BOOL, Required: true}, // should display debug messgaes? + {Name: "app_url_clear", Value: "http://localhost:7001/", Type: OPTION_TYPE_URL, Required: true}, // frontend application URL for the website + {Name: "password", Value: "", Type: OPTION_TYPE_STR, Required: true}, // admin password + {Name: "host", Value: "0.0.0.0:7002", Type: OPTION_TYPE_STR, Required: true}, // host the server should listen on + {Name: "ip_header", Value: "X-Real-IP", Type: OPTION_TYPE_STR, Required: false}, // header that should be checked for obtaining the client IP + {Name: "interval", Value: "1h", Type: OPTION_TYPE_STR, Required: false}, // service status check interval + {Name: "timeout", Value: "15s", Type: OPTION_TYPE_STR, Required: false}, // timeout for the service status check + {Name: "limit", Value: "5s", Type: OPTION_TYPE_STR, Required: false}, // if the service responds slower than this limit, it will be marked as "slow" } c.Count = len(c.Options) diff --git a/api/routes/index.go b/api/routes/index.go index 1d60bc7..d54b495 100644 --- a/api/routes/index.go +++ b/api/routes/index.go @@ -7,7 +7,7 @@ import ( func GET_Index(c *fiber.Ctx) error { conf := c.Locals("config").(*config.Type) - app := conf.GetURL("app_url") + app := conf.GetURL("app_url_clear") // redirect to the API documentation return c.Redirect(app.JoinPath("/doc/api").String()) diff --git a/api/routes/news.go b/api/routes/news.go index 1e8cdca..286c3ca 100644 --- a/api/routes/news.go +++ b/api/routes/news.go @@ -40,7 +40,7 @@ func GET_News(c *fiber.Ctx) error { db := c.Locals("database").(*database.Type) conf := c.Locals("config").(*config.Type) - app := conf.GetURL("app_url") + app := conf.GetURL("app_url_clear") lang := c.Params("lang") if lang == "" || len(lang) != 2 {