update the app_url config option
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
parent
8d16273540
commit
90af3d0500
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
func GET_Index(c *fiber.Ctx) error {
|
func GET_Index(c *fiber.Ctx) error {
|
||||||
conf := c.Locals("config").(*config.Type)
|
conf := c.Locals("config").(*config.Type)
|
||||||
app := conf.GetURL("app_url_clear")
|
app := conf.GetURL("app_url")
|
||||||
|
|
||||||
// redirect to the API documentation
|
// redirect to the API documentation
|
||||||
return c.Redirect(app.JoinPath("/doc/api").String())
|
return c.Redirect(app.JoinPath("/doc/api").String())
|
||||||
|
@ -40,7 +40,7 @@ func GET_News(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
db := c.Locals("database").(*database.Type)
|
db := c.Locals("database").(*database.Type)
|
||||||
conf := c.Locals("config").(*config.Type)
|
conf := c.Locals("config").(*config.Type)
|
||||||
app := conf.GetURL("app_url_clear")
|
app := conf.GetURL("app_url")
|
||||||
lang := c.Params("lang")
|
lang := c.Params("lang")
|
||||||
|
|
||||||
if lang == "" || len(lang) != 2 {
|
if lang == "" || len(lang) != 2 {
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
User-Agent: *
|
User-Agent: *
|
||||||
Disallow: /doc/
|
Disallow: /doc/
|
||||||
|
Disallow: /api/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user