fix url base on invite and broken getLanguages

This commit is contained in:
Harvey Tindall 2021-02-12 12:52:08 +00:00
parent 2ee0ed55f6
commit 4c653fea36
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 4 additions and 2 deletions

View File

@ -596,7 +596,9 @@ func start(asDaemon, firstCall bool) {
app.debug.Println("Loading pprof")
pprof.Register(router)
}
router.GET("/lang/:page", app.GetLanguages)
for _, p := range routePrefixes {
router.GET(p+"/lang/:page", app.GetLanguages)
}
if !firstRun {
for _, p := range routePrefixes {
router.GET(p+"/", app.AdminPage)

View File

@ -166,7 +166,7 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
email = ""
}
gcHTML(gc, http.StatusOK, "form-loader.html", gin.H{
"urlBase": app.getURLBase,
"urlBase": app.getURLBase(gc),
"cssClass": app.cssClass,
"contactMessage": app.config.Section("ui").Key("contact_message").String(),
"helpMessage": app.config.Section("ui").Key("help_message").String(),