update the app URL env var name in API config
All checks were successful
Build the docker image for the API / build (push) Successful in 2m18s
All checks were successful
Build the docker image for the API / build (push) Successful in 2m18s
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
parent
aa69525912
commit
bcb48d789b
@ -38,7 +38,7 @@ 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: "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
|
||||
|
@ -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())
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user