From 90af3d0500204506d3669c96afcf3e124428c13b Mon Sep 17 00:00:00 2001 From: ngn Date: Tue, 8 Apr 2025 03:07:14 +0300 Subject: [PATCH] update the app_url config option Signed-off-by: ngn --- api/routes/index.go | 2 +- api/routes/news.go | 2 +- app/static/robots.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/routes/index.go b/api/routes/index.go index d54b495..1d60bc7 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_clear") + app := conf.GetURL("app_url") // 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 286c3ca..1e8cdca 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_clear") + app := conf.GetURL("app_url") lang := c.Params("lang") if lang == "" || len(lang) != 2 { diff --git a/app/static/robots.txt b/app/static/robots.txt index 3e4d6c9..46f1c3c 100644 --- a/app/static/robots.txt +++ b/app/static/robots.txt @@ -1,2 +1,3 @@ User-Agent: * Disallow: /doc/ +Disallow: /api/